Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Original Enough?

by perldeveloper (Scribe)
on Jul 10, 2004 at 11:08 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2024-03-29 09:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found