PDA

View Full Version : regex


naqvia
09-13-2007, 10:07 PM
Why is this not working?

if ($chr=~/(chr(\d)\:(\d+))/g ){
my $num = $2;
my $position = $3;
push @{$chr{$num}},$position;
# print "$num","PP",$position,"PP\n";
}

nkrgupta
09-14-2007, 10:25 AM
Please be a little more explanatory, if not much, while posting questions. You need to state what are you trying to achieve using that code and some example input and desired output.

Are you getting any error message or just desired outptut missing?

Naveen