Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Perl (http://www.velocityreviews.com/forums/f17-perl.html)
-   -   can't get backreferences to work (http://www.velocityreviews.com/forums/t377461-cant-get-backreferences-to-work.html)

everymn@yahoo.com 02-20-2007 11:17 PM

can't get backreferences to work
 
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 02-21-2007 12:25 AM

Re: can't get backreferences to work
 
figured it out, thanks


All times are GMT. The time now is 10:48 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.