perl1line.txt icon indicating copy to clipboard operation
perl1line.txt copied to clipboard

Added one liners for PATH like expressions

Open mithun opened this issue 13 years ago • 2 comments

mithun avatar Nov 21 '11 01:11 mithun

Do you know how to get the perl -MData::Dumper -MModule -e 'print Dumper \%INC' working without Module module? Also I don't find PATH ones useful so I won't be merging that part. You can just do echo $PATH | sed 's/:/\n/g'. Perhaps I'll change them to perl's perl -le 'print $_ for (split ":", $ENV{PATH})'

pkrumins avatar Nov 21 '11 10:11 pkrumins

Do you know how to get the perl -MData::Dumper -MModule -e 'print Dumper \%INC' working without Module module?

I'm not sure if there's a way to do that without loading the module. Perhaps using something like Module::ScanDeps but then it cannot be run using a stock perl.

You can just do echo $PATH | sed 's/:/\n/g'.

Sure, that's easier. But only if you are on Linux or similar. Those PATH one-liners are pretty useful on Windows.

mithun avatar Nov 21 '11 13:11 mithun