On Sun, 2006-11-06 at 18:49 +0200, Adriano Allora wrote:
> yes,
> specifying the end of the string it's necessasy, but, if I write:
>
> #!/usr/bin/perl -w
>
> print STDOUT "Leggo...\n";
> while (<>)
> {
> print "$_" if /^\w{1,5}$/;
> }
>
> the script doesn't match words (but THERE ARE words of 5 or 4
> characters).
> I cannot undestand....
I works on my machine. Is the whitespace at the end of the lines? Try:
print if /\b\w{1,5}\b/;
--
__END__
Just my 0.00000002 million dollars worth,
--- Shawn
"For the things we have to learn before we can do them, we learn by doing them."
Aristotle
* Perl tutorials at http://perlmonks.org/?node=Tutorials
* A searchable perldoc is at http://perldoc.perl.org/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>