in reply to Reading a particular values from the file.
anushya, If i understood your question correctly, instead of if you use while
while ($num =~ m/<member-id>(\d+)/g){ push (@val, $1);} print "@val\n";
Also you can assign the $1 value to a string $val rather to an array @val.
while ($num =~ m/<member-id>(\d+)/g){ $val = $1; print $val,"\n";}or simply
@num = $num =~ m/<member-id>(\d+)/g;I think this is your first posting, welcome to the Monastery, use <c> tag for coding part.
updated
Regards,
Anniyan
(CREATED in HELL by DEVIL to s|EVILS|GOODS|g in WORLD)
|
---|
In Section
Seekers of Perl Wisdom