Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: query about perl

by eighty-one (Curate)
on Jun 18, 2010 at 17:53 UTC ( [id://845424]=note: print w/replies, xml ) Need Help??


in reply to query about perl

So you have a file called test.pl, and somewhere in there is print $ARGV[0]

On the command line, you type perl test.pl hello but you don't get 'hello' written to the command line as you expected.

Some more information would be useful. What does test.pl contain - just the text you indicated, or is that just one line of a file with multiple lines? What OS are you using? You state you don't get hello printed - is anything printed? An error message or notification of some kind? Or do you simply get no output whatsoever?

You might have more luck if you answer some of those questions. Also, take a look at How do I post a question effectively? and the Posting on PerlMonks section of the FAQ (the rest of the FAQ is good, too!); you should be able to get some advice on what you need to include so that you'll be providing enough information so as to make the problem you're having solvable by those who read your node.

Replies are listed 'Best First'.
Re^2: query about perl
by Anonymous Monk on Jun 21, 2010 at 16:57 UTC
    I'd just take him at his word that he used  $ARG[0], the  use English version of  $_[0] instead of  $ARGV[0].

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2024-03-28 19:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found