Howdy grewal, and welcome back again to the Monastery! Although all (Perl-related) questions are welcome in the Monastery, I'd like to submit that you could've saved yourself the trouble of having to post this one by using your favorite Internet search engine to search for "perl $ARGV[0]".

The first hit for me is this page, which says (right near the top):

Perl automatically provides an array called @ARGV, that holds all the values from the command line.

And if that's not enough (say, because you're not familiar with Perl's use of sigils like @ and $), it also explicitely says this a little further down:

If you expect a single value on the command line you can check what was it, or if it was provided at all by looking at $ARGV[0]. If you expect two variables you will also check $ARGV[1]

You might've gotten different results for your search, but I'm sure you would've found something to answer this question very quickly.

Just a tip for next time!


In reply to Re: $ARGV[0] meaning by AppleFritter
in thread $ARGV[0] meaning by grewal7634

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.