denzil_cactus has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

I am trying uucp command in a perl script to copy a file to another unix system

/usr/bin/uucp /usr/tmp/3.txt sysPc\!~/teston
and I am getting the following error
/usr/bin/uucp: sysPc: System not found
Please tell me the proper format as I didnt understand sysPc\!~/teston

Thanks

Replies are listed 'Best First'.
Re: Using UUCp command in a Perl script
by Fletch (Bishop) on Mar 27, 2008 at 12:40 UTC

    uucp?

    Really?

    Checks calendar. Looks around for rips in the space-time continuum.

    It's 2008 and you're trying to use uucp? Wow. Just . . . wow.

    (Seriously though, the error is because your system's uucp config doesn't know how to get to a machine named sysPC. This is the point where you find the ancient relic of a sysadmin at your site and ask them to cast runes or study entrails or whatever other deep magic and make uucp know the host. Or just punt and switch to a cross-system copy command that's been in widespread use more recently than the late 70s/early 80s . . .)

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

      I use UUCP at work, to talk to a very very old, but very VERY important legacy system.

      It's just one of those things that anything that has lived long enough to force you to use something so old, tends to be very important.

      On the plus side, UUCP does have a couple of things going for it.

      - Nobody targets exploits at it

      - So well polished that the code is utterly bulletproof. It simply NEVER breaks.
Re: Using UUCp command in a Perl script
by doc_faustroll (Scribe) on Mar 27, 2008 at 17:39 UTC
    Maybe you are working on a Marine Satellite network? </joke>

    Fletch's humor notwithstanding, rsync is preferable to scp.

    General advice: This adivce applies to any unix command line utility: You must first try at the command line after you read the man page.

    Second, once the command works on the commmand line, then wrap it in a perl system call, with error checking. Add logging and stir gently.

    This is not a cake