mkmcconn has asked for the wisdom of the Perl Monks concerning the following question:
If the $' in $'var is not at all related to $', how does Perl keep them straight?
#!/usr/bin/perl -wl use strict; $main::var = "a rose by "; #$main::var $main'var = $'var."another name"; #$main::var again use vars q($var); $var =~ s/(\b\w)/uc($1)/ge; #$main::var $var =~ /N/; print $'var; #print $main::var print 'G'.$'." With $'var"; #games with $' use English; print "s$' and s$POSTMATCH";
|Replies are listed 'Best First'.|
by tye (Sage) on Mar 01, 2001 at 01:43 UTC
The $'name G'ame.
by tadman (Prior) on Mar 01, 2001 at 01:18 UTC
Back to Seekers of Perl Wisdom