Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: Original Enough?

by perldeveloper (Scribe)
on Jul 10, 2004 at 11:08 UTC ( #373343=note: print w/replies, xml ) Need Help??


in reply to Re: Original Enough?
in thread Original Enough?

The diamond operator <> attempts to read from the file denoted by the elements in @ARGV (it tries reading from $ARGV[0] and increases the index in case opening the file denoted by the previous index fails).

An assignment of the form @ARGV=$0 is the same as @ARGV=($0), which actually means $ARGV[0]=$0. Since $0 is the filepath of the perl script itself, the diamond operator will read the first line from the perl script file.

The diamond operator will read from STDIN only if the @ARGV list is empty.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2023-03-22 03:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (60 votes). Check out past polls.

    Notices?