![]() |
|
|
|||||||
![]() |
PERL - can't get backreferences to work |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Could someone tell me what I'm doing wrong to cause the backreference
variable to fail to be assigned here? It's entering the If block 4 times, so I know it's matching but there's nothing in $1? Thank You! #! /usr/bin/perl use warnings; use strict; open FH, 'results.xml' or die "this didn't work: $!"; $/ = "<test-case name="; while (<FH>) { if (/rssupports/) { print "DEBUG: \n"; print "$1" if defined $1; } } OUTPUT: DEBUG: DEBUG: DEBUG: DEBUG: everymn@yahoo.com |
|
|
|
|
#2 |
|
Posts: n/a
|
figured it out, thanks
|
|