Also note that you could make your main loop much simpler using the <> operator.
#!/usr/bin/perl -w use strict; use Getopt::Std; my $prog = $0; $prog =~ s|.*/||; my %opts; getopts('o:', \%opts); my $cmd = $opts{o} || 1; my %wordDb = (); # Works exactly like your posted code is supposed to while(<>) { print "$ARGV ==> $_"; }
bbfu
Black flowers blossom
Fearless on my breath
In reply to Re: Can't print data from the input file in Command Line processing.
by bbfu
in thread Can't print data from the input file in Command Line processing.
by bh_perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |