If by "number" you mean an integer device number, the following technique for getting a list of results for regex captures should help. It is documented among other places here: http://perldoc.perl.org/perlrequick.html#Extracting-matches
use warnings; use strict; my ($device) = defined($ARGV[0]) ? $ARGV[0] =~ /^\s*(\d+)\s*$/ : ''; print "Device #$device\n";
In reply to Re^2: Using number "0" as an input argument
by mr_ron
in thread Using number "0" as an input argument
by Doozer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |