Re: how to use command line parameters

2005-07-14 Thread Todd W
"Manish Uskaikar" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] command line: $perl man.pl manish perl script #!/usr/bin/perl; ($inputfile) = @ARGS; Could anyone tell me how to accept the commandline parametes this does not seem to work. for simple arguments this works great.

Re: how to use command line parameters

2005-07-14 Thread John Doe
Manish Uskaikar am Donnerstag, 14. Juli 2005 18.21: > command line: > $perl man.pl manish > > perl script: > #!/usr/bin/perl; > ($inputfile) = @ARGS; > > Could anyone tell me how to accept the commandline parametes this does not > seem to work. please put the following lines into every script/modu

Re: how to use command line parameters

2005-07-14 Thread Remo Sanges
Remo Sanges wrote: Manish Uskaikar wrote: command line: $perl man.pl manish perl script #!/usr/bin/perl; ($inputfile) = @ARGS; Could anyone tell me how to accept the commandline parametes this does not seem to work. @ARGV and not @ARGS is an array so you have to use it by element. In

Re: how to use command line parameters

2005-07-14 Thread Remo Sanges
Manish Uskaikar wrote: command line: $perl man.pl manish perl script #!/usr/bin/perl; ($inputfile) = @ARGS; Could anyone tell me how to accept the commandline parametes this does not seem to work. @ARGV and not @ARGS is an array so you have to use it by element. In your case the name of

Re: how to use command line parameters

2005-07-14 Thread Remo Sanges
Manish Uskaikar wrote: command line: $perl man.pl manish perl script #!/usr/bin/perl; ($inputfile) = @ARGS; Could anyone tell me how to accept the commandline parametes this does not seem to work. @ARGV and not @ARGS is an array so you have to use it by element. In your case the name of

how to use command line parameters

2005-07-14 Thread Manish Uskaikar
command line: $perl man.pl manish perl script #!/usr/bin/perl; ($inputfile) = @ARGS; Could anyone tell me how to accept the commandline parametes this does not seem to work. Regards, Manish U

Re: Command line parameters

2005-04-13 Thread Jay Savage
On 4/13/05, John Doe <[EMAIL PROTECTED]> wrote: > Am Mittwoch, 13. April 2005 10.46 schrieb Ramprasad A Padmanabhan: > > On Wed, 2005-04-13 at 12:32, Thomas Bätzler wrote: > > > Ramprasad A Padmanabhan <[EMAIL PROTECTED]> asked: > > > > I want to write a perl script like "gnu less". > > > > > > > >

Re: Command line parameters

2005-04-13 Thread John W. Krahn
Ramprasad A Padmanabhan wrote: I want to write a perl script like "gnu less". My perl script accepts input on STDIN or filename(s) as arguments. If both are missing it should print the error message. How do I do this ? The pseudocode will be -- IF INPUT ON STDIN ;then Process ST

Re: Command line parameters

2005-04-13 Thread John Doe
Am Mittwoch, 13. April 2005 10.46 schrieb Ramprasad A Padmanabhan: > On Wed, 2005-04-13 at 12:32, Thomas BÃtzler wrote: > > Ramprasad A Padmanabhan <[EMAIL PROTECTED]> asked: > > > I want to write a perl script like "gnu less". > > > > > > My perl script accepts input on STDIN or filename(s) as arg

RE: Command line parameters

2005-04-13 Thread Ramprasad A Padmanabhan
On Wed, 2005-04-13 at 12:32, Thomas BÃtzler wrote: > Ramprasad A Padmanabhan <[EMAIL PROTECTED]> asked: > > I want to write a perl script like "gnu less". > > > > My perl script accepts input on STDIN or filename(s) as arguments. > > If both are missing it should print the error message. How do

RE: Command line parameters

2005-04-13 Thread Thomas Bätzler
Ramprasad A Padmanabhan <[EMAIL PROTECTED]> asked: > I want to write a perl script like "gnu less". > > My perl script accepts input on STDIN or filename(s) as arguments. > If both are missing it should print the error message. How do > I do this ? There is always input on STDIN - even a straig

Command line parameters

2005-04-12 Thread Ramprasad A Padmanabhan
I want to write a perl script like "gnu less". My perl script accepts input on STDIN or filename(s) as arguments. If both are missing it should print the error message. How do I do this ? The pseudocode will be -- IF INPUT ON STDIN ;then Process STDIN ELSE IF ARGUMENT(S) is a

Re: How use command line parameters?

2002-04-16 Thread Ramis
Many thanks! It works. Johannes Franken wrote: > > * Ramis <[EMAIL PROTECTED]> [2002-04-15 22:14 +0200]: > > I want to get a file name from command line > > Perl pushes then to a list named @ARGV . > So you can access them with any function that > operates on lists, like > foreach, shift, pop o

Re: How use command line parameters?

2002-04-15 Thread Jonathan E. Paton
> I want to get a file name from command line, like this: > somecommand.pl filename #!/usr/bin/perl -w my $filename = shift; print $filename; > How I can realize it? How it realizes with several files: > somecommand.pl file1,file2... fileN? Arguments are stored in @ARGV, which is also @_ at the

Re: How use command line parameters?

2002-04-15 Thread Johannes Franken
* Ramis <[EMAIL PROTECTED]> [2002-04-15 22:14 +0200]: > I want to get a file name from command line Perl pushes then to a list named @ARGV . So you can access them with any function that operates on lists, like foreach, shift, pop or just $ARGV[n] . > How it realizes with several files: somecom

How use command line parameters?

2002-04-15 Thread Ramis
Hi! I want to get a file name from command line, like this: somecommand.pl filename How I can realize it? How it realizes with several files: somecommand.pl file1,file2... fileN? Thanks. -- ---! My blessing! Ramis. ! ---! http://www.samtan.fromru.com mailto: [EMAIL PROTECTED