I'm missing something about Perl's regexp: 1 #!/usr/bin/perl -w 2 use strict; 3 my $s=<STDIN>; 4 $s=~s/\D*//; 5 $s=~s/\D*//; 6 print "$s\n";
When input is 'a123b', I get '123b', but I expected '123'. I know I can substitute line 4 by '$s=~s/\D*//g;' and comment out line 5. It will work then, but that is not the point. I could also substitute line 5 by '$s=~s/\D+//;' and it would also work... -- Jorge Almeida -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/