"Mr. Shawn H. Corey" schreef:
> print if /\b\w{1,5}\b/;
Variants:
print "<$_>\n" for /\b\w{1,5}\b/g ;
print "<$1>\n" while /\b(\w{1,5})\b/g ;
that would split up "marsh-fever".
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional com
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 TH
On Sun, Jun 11, 2006 at 06:49:30PM +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
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
abbuonandot
On Sun, Jun 11, 2006 at 04:33:52PM +0200, Adriano Allora wrote:
> i need to extract from a list of words (in a single column) anotherl
> list containing only the words of 5 or less chars.
>
> I wrote this script, but it doesn't work:
>
> #!/usr/bin/perl -w
>
> while (<>)
> {
> pri
Hi to all,
i need to extract from a list of words (in a single column) anotherl
list containing only the words of 5 or less chars.
I wrote this script, but it doesn't work:
#!/usr/bin/perl -w
while (<>)
{
print "$_" if /^\w{,5}/;
}
someone can tell me why it does no