Yea, brethren, learn from my error in using cut 'n' paste code without being mindful of a scalar context typo. Learn, too, the peril of not using a standard module written by wiser ones (File::Basename), for the road to error starts off with a quick hack ...

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"


In reply to Pennance: Learn from my scalar context folly ... by Willard B. Trophy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.