Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Can't print data from the input file in Command Line processing.

by bbfu (Curate)
on Dec 01, 2003 at 06:53 UTC ( #311180=note: print w/ replies, xml ) Need Help??


in reply to Can't print data from the input file in Command Line processing.

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


Comment on Re: Can't print data from the input file in Command Line processing.
Select or Download Code
Re: Re: Can't print data from the input file in Command Line processing.
by Anonymous Monk on Dec 01, 2003 at 07:53 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://311180]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (11)
As of 2014-12-27 16:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls