
andy7t
User
Aug 19, 2003, 7:41 AM
Post #1 of 3
(299 views)
|
Problem: =~ / /
|
Can't Post
|
|
Hello, I was making a script, and after an hour of tearing my hair out on a simple =~/something/ i decided to run a small test: $var1= "hello"; print "Does $var1 have a 'h' in?\n"; $var2 = "h"; if($var2 =~ /$var1/) { print "Yes\n"; } else{ print "no\n"; } Every time 'no' is printed on the screen. Is there something wrong with my scripts and the way i am doing it???? Or is there something wrong with my version of perl?
|