Я на перле пишу быстренький hack. Первый раз сегодня увидел код на перле и мне нужна помощь.
Вот этот кусок кода мне нужно чтоб распознал тот факт что $line contains $error and because it does I need it to execute if statement. So in other words I thought that ($line =~ m/$error1/i) must return true
$line = "abc blah-blah";
$error1 = "abc"
if ($line =~ m/$error1/i){
..............
..............
}
вот здесь я нашел способ сравнивать :
http://www.troubleshooters.com/codec...rl/perlreg.htm
The most basic string comparison is
$string =~ m/sought_text/;
But this shit doesn't work. Can anyone tell me why and how to fix it?



Reply With Quote



