in reply to <> oddity ?
this
$ ./weird.pl sample.txt
is fundamentally different to
$ ./weird.pl <sample.txt or $ cat sample.txt | ./weird.pl
the first passes a filename as argument while the latter two pipe the content of this file into STDIN.
See ARGV for a way to solve this.
Cheers Rolf
( addicted to the Perl Programming Language)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: <> oddity ?
by hdb (Monsignor) on Mar 27, 2013 at 10:31 UTC | |
by LanX (Saint) on Mar 27, 2013 at 10:48 UTC | |
Re^2: <> oddity ?
by Krambambuli (Curate) on Mar 27, 2013 at 10:31 UTC | |
by LanX (Saint) on Mar 27, 2013 at 10:41 UTC | |
by hdb (Monsignor) on Mar 27, 2013 at 10:36 UTC |
In Section
Seekers of Perl Wisdom