Hello folks!

I'm reading Jos Boumans "Perl Beginners Tutorial To Regular Expressions".
I'm stuck with a problem. Jos writes:

Also realise that $1 and friends store the contents of the last succesfull
match...
I wanted to check that and wrote this code:

--------------------------------
#!/usr/bin/perl -w
use strict;

my($string) = "This is a test!";
my($ergebnis);

$string =~ m/(\s\w+\s)/g;
$ergebnis = $1;
print("$ergebnis\n");
--------------------------------

Shouldn't a be printed?
I'm runnig perl, v5.6.0 built for i586-linux.
I wouldn't bother normally, but I'm trying to understand every bit of
perl...

al


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to