in reply to Learn Unix multiline syntax

Errr .. what have you tried? Seems like

system( "rcp", "$ENV{DIR_CCIFAS}/sys_snapshot_infostag", "$ENV{DIR_CCIFAS}/sys_snapshot_infostag" );
would do the trick? Multiline really doesn't come into play.

-derby

Replies are listed 'Best First'.
Re^2: Learn Unix multiline syntax
by kafkaf55 (Acolyte) on Aug 16, 2010 at 18:11 UTC
    This command is working fine:
    `rcp "$DTMP/$Filename"_"stub" infostag:/"$TDIR/$Filename"_"stub"` ;

    `rcp "infostag:$DIR_CCIFAS/sys_snapshot_infostag",
    "$DIR_CCIFAS/sys_snapshot_infostag"` ;
    Results: Usage: rcp -p -F -k realm f1 f2; or: rcp -rp f1 ... fn d2
    sh: /ccifas/logs/snapshot_logs/sys_snapshot_infostag: 0403-006 Execute permission denied.

    system(rcp "infostag:$DIR_CCIFAS/sys_snapshot_infostag",
    "$DIR_CCIFAS/sys_snapshot_infostag") ;

    Results: Name "main::rcp" used only once: possible typo at ./kwb line 14.
    Can't exec "*main::rcp": A file or directory in the path name does not exist. at ./kwb line 13.

      Note that derby had
          system( "rcp", "quotedstring", "quotedstring" );
      whereas you have
          system(rcp "quotedstring", "quotedstring");
      which Perl thinks is a call to the Perl function  rcp with a couple of strings as arguments.