Update: Changed \w to \S as original question was split on multiple space characters (thanks to cdarke for spotting this) and modified argument list.$ perl -e 'use strict; sub input{ my (@params) = $_[0] =~ m/([\S]+)/g; print scalar @params ," parameters supplied\n"; } input(join " ", @ARGV); ' Fear Anger Hate Darkside 4 parameters supplied
In reply to Re: Perl newbie question.
by Utilitarian
in thread Perl newbie question.
by yoda54
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |