in reply to Style and warnings
my ($num)= $seqnum=~/^(\d+)/; my $bigseqnum = $num + 10000000 ...
This naturally only works if the number in $seqnum always conforms to that regex (for example no negative number) and there are no spaces etc. before the number. Otherwise the regex has to be adapted to work in all those cases
The other possibility is to turn of warnings at that point:
no warnings; my $bigseqnum = int($seqnum) + 10000000 ... use warnings;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Style and warnings
by Tanktalus (Canon) on Aug 18, 2009 at 15:29 UTC | |
|
Re^2: Style and warnings
by JavaFan (Canon) on Aug 18, 2009 at 15:35 UTC | |
by jethro (Monsignor) on Aug 18, 2009 at 16:37 UTC | |
|
Re^2: Style and warnings
by rovf (Priest) on Aug 19, 2009 at 07:53 UTC |