hello;
I've want to make a subroutine ou find a path;
it's my script
my sub find $var2;
it's correct or it can be not return the good result ?
if i've this
he find the first
thanks
I've want to make a subroutine ou find a path;
it's my script
Code:
#!/usr/bin/perl
use strict;
sub findme
{
if ($_[1] =~ /$_[0]/) {
print "I'm find it\n";
print "We are looking for -----------> $_[0]\n";
print "In -----------> $_[1]\n";
}
else {
print "Isn 't here\n";
print "We are looking for -----------> $_[0]\n";
print "In -----------> $_[1]\n";
}
}
my $var1 = "/opt/sqlserver/admin/general/bin:/opt/sqlserver/product/ISOO99/bin:/opt/sqlserver/product/bin:/usr/esso/bin:/usr/local/bin:/bin:";
my $var2 = "/opt/sqlserver/product/bin";
&findme($var2,$var1)
my sub find $var2;
it's correct or it can be not return the good result ?
if i've this
"/opt/sqlserver/admin/general/bin:/opt/sqlserver/product/bin/ISOO99/bin:/opt/sqlserver/product/bin:"
he find the first
??/opt/sqlserver/product/bin
thanks