in reply to Net::SFTP::Foreign error
... as haukex said or hack your way around it:
... warn( "Put failed: @{[$sftp->error]} \n" ) ...
Update to response below:
The @{ ... } dereferences an array-ref. By default, the resulting string is a space separated (see $" in perlvar) concatenation of the array elements. However, $sftp->error() returns a scalar (string). Here, the square brackets come into play. They generate an anonymous array - with one single element - that finally is dereferenced and interpolated.
It's somewhat equivalent to: warn( "Put failed: " . join($", @{ [ $sftp->error() ] }) . " \n" );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Net::SFTP::Foreign error
by roperl (Beadle) on Sep 25, 2018 at 20:30 UTC | |
by AnomalousMonk (Archbishop) on Sep 25, 2018 at 21:37 UTC | |
by salva (Canon) on Sep 26, 2018 at 07:31 UTC | |
by AnomalousMonk (Archbishop) on Sep 26, 2018 at 14:59 UTC | |
by roperl (Beadle) on Sep 26, 2018 at 17:51 UTC | |
| |
by AnomalousMonk (Archbishop) on Sep 26, 2018 at 23:01 UTC |