fjonckers has asked for the wisdom of the Perl Monks concerning the following question:
I remember seeing this somewhere but can't find it anymore....
want to define the value of a var on the commandline. is this possible ?
example commandline: perl -e $myvar=123; test.pl
example perl script test.pl: print "the value is $myvar";
this is a very simple example of course...
probably a stupid syntax error somewhere ;-)
any help greatly appreciated!
Filip
Edited: ~Tue Jul 9 18:24:02 2002 (GMT),
by footpad:
Added <code> (and other formatting) tags, per Consideration.
|
---|
Replies are listed 'Best First'. | |
---|---|
•Re: defining variable values on the commandline
by merlyn (Sage) on Jul 09, 2002 at 15:44 UTC | |
Re: defining variable values on the commandline
by broquaint (Abbot) on Jul 09, 2002 at 15:45 UTC | |
by fjonckers (Novice) on Jul 09, 2002 at 16:30 UTC | |
Re: defining variable values on the commandline
by Fastolfe (Vicar) on Jul 09, 2002 at 21:08 UTC |