Код: Выделить всё
/path/to/file start
А в какой переменной оно будет?
Код: Выделить всё
/path/to/file start
Код: Выделить всё
use Getopt::что то;
я вот книжков не читаю, зато есть реальные задачи - тут быстро кодить учишься.f_andrey писал(а):Ну и что много модулей не бывает, можно и без него реализовать, там в ссылке есть примечание где по книжке искать примеры и таких выборок, в общем как завешал ильичь учится учится и учится![]()
Блин надо что ль все таки дочитать книжку и начать тренироваться что то кодить
Код: Выделить всё
zg# ./1.sh one two three
Argument: one
Argument: two
Argument: three
zg# cat 1.sh
#!/usr/bin/perl -w
foreach (@ARGV) { print "Argument: $_\n"; }
zg#
Код: Выделить всё
ARGV The special filehandle that iterates over command-line file-
names in @ARGV. Usually written as the null filehandle in the
angle operator "<>". Note that currently "ARGV" only has its
magical effect within the "<>" operator; elsewhere it is just a
plain filehandle corresponding to the last file opened by "<>".
In particular, passing "\*ARGV" as a parameter to a function
that expects a filehandle may not cause your function to auto-
matically read the contents of all the files in @ARGV.
$ARGV contains the name of the current file when reading from <>.
@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 pro-
gram's command name itself. See $0 for the command name.