Perl und Parameter über die Shell

Post Reply
Message
Author
Matong

Perl und Parameter über die Shell

#1 Post by Matong »

Hallo Leute,
ich bin seit 1 Monat ein begeisterter php programmierer, doch jetzt brauch ich mal zur abwechslung perl. ich möchte meinem perl-skript einen Parameter mit übergeben, also sowas wie argc/argv unter c/c++. Nur ich habe keine Ahnung, wie man das macht. Geht das überhaupt und wenn ja wie???

Also, vielen Dank schon mal,
Matong

Thomas

Re: Perl und Parameter über die Shell

#2 Post by Thomas »

Aber sicher doch:

@ARGV
The array @ARGV contains the command-line arguments intended for the script. $#ARGV is generally the number of arguments minus one, because $ARGV[0] is the first argument, not the program's command name itself. See $0 for the command name.

(Auszug aus: http://www.perldoc.com/perl5.6/pod/perlvar.html)

Gruss,
Thomas

Matong

Re: Perl und Parameter über die Shell

#3 Post by Matong »

Vielen Dank für deinen Tipp,
hat wunderbar geklappt.

Cu Matong

Post Reply