Ok, I know I'm not very good with Regex, but I can't work out why this bit won't work.
foreach $line (@htaccess)
{
if ($usernamenew =~ /^$line/) { &username_error; } else { print "ok"; }
}
}
The format of the .htaccess file is;
andy::password
test::somepassword
Test2::anotherpassword
Any ideas why this isn't working? Its got me stumped. I've been reading through my Perl book to try and work out why it won't work, but havn't had any success.
They say that using
$word = "hello";
$word =~ /^hell/;
will work, but my code doesn't seem to want to
Any ideas?
Thanks
Andy
webmaster@ace-installer.com
http://www.ace-installer.com
foreach $line (@htaccess)
{
if ($usernamenew =~ /^$line/) { &username_error; } else { print "ok"; }
}
}
The format of the .htaccess file is;
andy::password
test::somepassword
Test2::anotherpassword
Any ideas why this isn't working? Its got me stumped. I've been reading through my Perl book to try and work out why it won't work, but havn't had any success.
They say that using
$word = "hello";
$word =~ /^hell/;
will work, but my code doesn't seem to want to
Any ideas?
Thanks
Andy
webmaster@ace-installer.com
http://www.ace-installer.com