"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.
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
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
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
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
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
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".
> > > >
> > > >
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
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
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
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
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
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
> 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
* 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
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
16 matches
Mail list logo