Re: take the file name in as an argument of the function

2002-01-16 Thread Jonathan E. Paton
Hi, For anything more complex than a simple script you should consider using switches and parameters. You know, something like this [highly dangerous] dd command: dd if=/dev/zero of=/dev/hda7 count=1 bs=512 Or: tar -zxvf archive.tar.gz Processing these can be quite hard, but guess what... th

Re: take the file name in as an argument of the function

2002-01-16 Thread Johnathan Kupferer
> > >But how could I take two arguments from the command line: > >i.e. my guess: > >%Test.pl "Foo" "Bar" > >#/!/usr/bin/perl > $A = $ARGV[0]; > $B = $ARGV[1]; > print "Thing A: $A Thing B: $B"; > I think you already answered your own question! Though your shebang line should be "

take the file name in as an argument of the function

2002-01-16 Thread Booher Timothy B 1stLt AFRL/MNAC
Hello all. I want to be able to take the file name in as an argument of the function, for example: %Extract.pl MyFile.txt I know that I could use: #!/usr/bin/perl while (<>) { } But how could I take two arguments from the command line: i.e. my guess: %Test.pl "Foo" "B