Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: read file from ARGV

by 2teez (Priest)
on Feb 02, 2013 at 08:56 UTC ( #1016681=note: print w/ replies, xml ) Need Help??


in reply to read file from ARGV

@ARGV[0] will open the word.txt file

@ARGV is the array that contains the command-line arguments intended for the script.
In Perl Programming, to get the first element of an array(such as @ARGV), you use $ARGV[0], not @ARGV[0].
Please note the usage of "$" and "@".
Please also check What is the difference between $array[1] and @array[1]?

If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me


Comment on Re: read file from ARGV
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (17)
As of 2015-07-01 21:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (22 votes), past polls