| Next | Regular Expression Mastery | 43 |
. matches any character....
except newline!
Why not?
$time = <STDIN>; # "11:29\n"
($minutes) = ($time =~ /:(.*)$/);
So that $minutes gets "29" and not "29\n"
| Next | ![]() |
Copyright © 2002 M. J. Dominus |