-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of [EMAIL PROTECTED]
Sent: Thursday, April 21, 2005 11:59
To: [email protected]
Subject: Filename pull
Hey, wizards.
I've got this problem: pulling the bare filename off of a fully pathed string, using split. The tricky part is getting the last element in the array when I don't know how many members are in it. Example:
$s1 = "c:\\temp\\foo.pl";
$barename = (split( /\\/, $s1)[2]; # $barename gets "foo.pl"To get the last item use [-1].Wags ;)
*******************************************************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
*******************************************************
_______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
