wats wrong?

2001-10-27 Thread pApA_rOACh
Hi! Hear is string that should work, at least i think so. last if m/^\s*model\s*tiny.*/i while (<>); Can anybody say what's wrong. while <>; - Valid perl construction hence last if m/^\s*model\s*tiny.*/i is not a Perl statement!!! But if we write somthing like last if m/^\s*model\s*tiny.*/i pe

Re: Regex query

2001-10-25 Thread pApA_rOACh
Try this in your cycl: foreach $x (keys %Replacements) { eval("\$inputstr =~ s/$x/$Replacements{$x}/g"); } Or somthing like this; feature to remember: $inputstr should not extends; we do this by \$inputstr but other variables shoul go. - Original Message - From: "Girish (Skyscape)"

Re: How to split it?

2001-10-22 Thread pApA_rOACh
Maybe this?? $line =~ s/([^:])*:/\e:$1/g;#Substitute pattern instead of : in regexp $line =~ s/^\e(.*)/$1/; #Ommit first \e character @answer =~ split(/\e/, $line); #That's all! Should Work >From Russia with love!!! It's getting cold here ;-) - Original Message - F