Explained here:
http://perldoc.perl.org/perlop.html#Regexp-Quote-Like-Operators-operator%2c-regexp

On 8/22/07, Alexandru Maximciuc <[EMAIL PROTECTED]> wrote:
> Hello,
>
> could someone please explain me these results:
>
> --------------------
> use strict;
> use warnings;
>
> my $re = qr!a!;
>
> $_ = join '', <DATA>;
>
> print "1) ".scalar($_ =~ /$re/g)."\n";
> my @a = $_ =~ /$re/g;
> print "1) ".scalar(@a)."\n";
>
> __DATA__
> jaskdgbanio ehioa sdoija oihfcasoi dnfmalmods gnijashdugoiahisr 
> goijmocsvhaooajoi ajo
> sdjahsoia
>
> -----------------------
> Output:
> 1) 1
> 1) 12
>
> thanks in advance
>
>
>
> --
> Best regards,
>  Alexandru                          mailto:[EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to