in reply to Re^2: Feed ARGV into one-liner
in thread Feed ARGV into one-liner
produces the arg-MB';$'F=shift
You're probably familiar with -M. It used to load a module. It does so by inserting-MB;$F=shift
into the source. In this case, MODULENAME is B;$F=shift, souse MODULENAME;
is inserted into the source. B is a core module. It's not being used at all by the program. The only purpose to load it is to execute $F=shift; before the -n loop with very few keystrokes. The following would also work; it's just not nearly as short:use B;$F=shift;
'-MData::Dumper; $F=shift'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Feed ARGV into one-liner
by fod (Friar) on Jan 22, 2010 at 11:06 UTC |