codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  about @argv  pangpang at 03:10 on Thursday, March 05, 2009
 

I would like to pass two file names as parameters on command line
I am thinking about using @argv.

However, it looks very silly if I type the following on command line and use $ARGV[0],$ARGV[1],$ARGV[2] in myScript.pl

> perl myScript.pl file1 file2 file3


Is there any complicated way to do it? Thank you!!

  Re: about @argv  hermanningjaldsson at 06:55 on Thursday, March 05, 2009
 

why is it silly?

usually u should strive for simplicity when solving a problem,
not complexity.



<Added>

off course, u should, for readability's sake,
change the name argv into something more descriptive, like filenames.

my @filenames = @argv;




  Re: about @argv  pangpang at 13:51 on Thursday, March 05, 2009
 

Thank you very much hermanningjaldsson!








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  Re: Customizable Event Calender, using C#
•  Re: transfer the contents of a datagrid to excel
•  How to focus on email field after clicking OK in alert?
•  Re: about @argv
•  Re: How to multiply and disable checkbox value in one shot
•  BIG file question: about median
•  Re: Passing Password using $ssh->cmd
•  Re: sum of columns
•  pop up Click-able Calendar need to output to 3 text fields


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2009