In a between-hosts file copy script, I used my cheapo, shoddy basename routine:
my ($localfile) = reverse(split('/', $actualfile));
(I use this routine as it's overkill to load a module when you only want one function, once, in a small script on a stripped-down unix box.)
So when $actualfile = '/jobs/mac/00FTP/alphasmart_catalog.pdf', I should have ended up with 'alphasmart_catalog.pdf'.
Unfortunately, I forgot the () around $localfile. A file test failed; not surprisingly, it couldn't find a file called 'fdp.golatac_tramsahplaPTF00camsboj'
Willard
(the one in the hair shirt, in amongst the ashes)
--
$,="\n";foreach(split('',"\3\3\3c>\0>c\177cc\0~c~``\0cc\177cc"))
{$a++;$_=unpack('B8',$_);tr,01,\40#,;$b[$a%6].=$_};print@b,"\n"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Pennance: Learn from my scalar context folly ...
by jepri (Parson) on Nov 05, 2002 at 01:21 UTC | |
|
•Re: Pennance: Learn from my scalar context folly ...
by merlyn (Sage) on Nov 05, 2002 at 02:13 UTC |