Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^5: Multiple file input into a perl script

by Corion (Pope)
on Oct 01, 2008 at 05:42 UTC ( #714712=note: print w/replies, xml ) Need Help??


in reply to Re^4: Multiple file input into a perl script
in thread Multiple file input into a perl script

That part works. The empty diamond, used to read the contents of all files (or STDIN) is what doesn't work without setting up @ARGV. That dual use is why I prefer an explicit glob() over the diamond...
  • Comment on Re^5: Multiple file input into a perl script

Replies are listed 'Best First'.
Re^6: Multiple file input into a perl script
by broomduster (Priest) on Oct 01, 2008 at 12:51 UTC
    That dual use is why I prefer an explicit glob() over the diamond..
    And so do I ;-)... In fact, just last week at $DAYJOB, I had an interesting "discussion" with $COWORKER who is relatively new to Perl and insisted that
    • while ( <> )
    • while ( <file*> )
    • while ( <@ARGV> )
    all do the same thing. When $COWORKER was confronted with examples of the differences, the "problem" morphed first into "a bug in Perl", then to "incorrect documentation", then to "should do the same thing" (I guess that's progress :-) ). All of which is a long (and hopefully slightly humorous) explanation of why I should have caught what you were saying the first time.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://714712]
help
Chatterbox?
[1nickt]: I have been an apostate in the Apple orchard for almost 15 years. But Dells are still high quality it seems, unlike Macs these days.
[1nickt]: And you can still configure the system at will, on the "Small Business" site.
[Corion]: 1nickt: I bought a 2015 XPS 13, which is a very nice and shiney (and somewhat overpriced) machine, but I think it's still better priced than an Apple machine. Now it just has to hold up 10 years like the old one did ;)

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2017-03-27 13:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (320 votes). Check out past polls.