$me = $0;
if ( $^O eq 'MSWin32' )
{
$me=~s{.*\\}{};
print "Usage : $me <file>!\n"
}
else
{
$me=~s{.*/}{};
print "Usage : $me <file>!\n"
}
Or
my $command = $0;
$command =~ s#^.*/##;
Or
( my $me = $0 ) =~ s{.*(\\|/)}{};
if ( $^O eq 'MSWin32' )
{
$me=~s{.*\\}{};
print "Usage : $me <file>!\n"
}
else
{
$me=~s{.*/}{};
print "Usage : $me <file>!\n"
}
Or
my $command = $0;
$command =~ s#^.*/##;
Or
( my $me = $0 ) =~ s{.*(\\|/)}{};
No comments :
Post a Comment