Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: $+ versus $^N

by Enlil (Parson)
on Apr 16, 2003 at 05:48 UTC ( [id://250796]=note: print w/replies, xml ) Need Help??


in reply to $+ versus $^N

Here is some code to show the difference (perlvar as you quoted gives a good description):
use strict; use warnings; my $plus; my $N; my $text = "abc123def"; my $text_match = qr/((\D+)(\d+))(?{ $plus = $+;$N = $^N })(\D+)/; $text =~ $text_match; print "$plus, $N\n"; $text_match = qr/(\D+)(\d+)(?{ $plus = $+;$N = $^N })(\D+)/; $text =~ $text_match; print "$plus, $N\n";

update:oh yeah the results:

__END__ 123, abc123 123, 123
-enlil

Replies are listed 'Best First'.
Re: Re: $+ versus $^N
by diotalevi (Canon) on Apr 16, 2003 at 13:09 UTC

    The description may have been good but I wasn't up to the task of noticing the difference. Thank you all for clarifying this.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://250796]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-23 22:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found