in reply to pattern Matching
There's no match function in Perl. There is a match operator.
$str =~ /test\/comp\/test1\/test2/ [download]
or better yet,
$str =~ m{test/comp/test1/test2} [download]
You should have a look at perlre.