> Often I need to extract the file name from a path.
$current_file = "c:/somedir/test.ps";
@split_path = split("/",$current_file);
$current_file = @split_path[-1];
print $current_file;
You want to use the '$' sigil here, not '@' (you're refering to just one
element, not the whole array):
$cur
try this:
#!/perl -w
$current_file = "c:/somedir/test.ps";
$current_file =~ /.*(\/|\\)(.*)/gi;
print $2;
:)
fabrÃcio s. martins
-Mensagem original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] nome de John Townsend
Enviada em: sexta-feira, 13 de abril de 2007 17:53
Para: [EMAI