regular expression help with apostrophe

P

Paul Lalli

Ted Zlatanov said:
This example does not have anything to do with the $1...$9 variables.
There are only 9 of them,

Who on earth told you that?

#!/usr/bin/perl
use strict;
no strict 'refs';
use warnings;

$_ = join '', 'a'..'z';
/(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.
)(.)(.)/;
for (1..26){
print "${$_}\n";
}
__END__


Paul Lalli
 
T

Ted Zlatanov

You mean the backreferences \1 ... \9.

I originally meant the backreferences and got confused, but my (lame)
joke was that there ARE only 9 variables from $1 to $9 :)

Consider me chastised.

Ted
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,778
Messages
2,569,605
Members
45,238
Latest member
Top CryptoPodcasts

Latest Threads

Top