I would run system commands with the backticks. That tells Perl to run the command and place the contents in the variable you defined.
System OTOH returns if the command completed successfully (at least I believe that's what happened here). > Moon, John wrote: > > Hello, > > > I run the following commands but ALWAYS get a 1 returned from the > > system "scp ... ". > > > > Has anyone else experienced similar problems with ssh? Or see anything I'm > > doing wrong? > > > > <snip> > > my $results=system 'scp -q accounts_4_unix.dat ' > > . > "[EMAIL PROTECTED]:Inbox/System_Support/MakeProjects/projects.dat"; > > perldoc -f system > > system() doesn't do/return what you think it does I beleive. > > Try > my $results = `scp ...`; > > HTH :) > Lee.M - JupiterHost.Net > > ..... > > Thanks for the reply... > > That, back tics, "seems" to take care of the problem (?)... > > Now, I guess I'm a little confused as to when to use "system" and when to > use back tics... > > jwm > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <http://learn.perl.org/> <http://learn.perl.org/first-response> > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>