blazar has asked for the wisdom of the Perl Monks concerning the following question:
Now the problem is that the logs' filenames contain ehm... a '>' sign. Now, up to this very moment we had not had any substantial problem with this, apart that it is a PITA whenever one has to manually peek into one of those logs and systematically forgets to quote them (because he's using C&P from the output of some other program).
But now a much more serious problem arose, probably due to the fact that I'm using Net::SCP to transfer the files and that this module is only a wrapper around scp. Please note that I say so because I succeed in transferring files with "normal" names whereas I can't get around those damned logs either using them literally or (adopting the dirty workaround of) quoting that '>'.
The relevant portions of code are:
Do you have any suggestion about alternative {modules,strategies} to use? Also, it's not something I ask for, generally, but could you supply some ready-made minimal examples?my $scp=Net::SCP->new( { host => 'the_real_host', user => 'the_real_user', interactive => 0, cwd => '/path/to/somewhere' } ); # ... (my $quoted=$_) =~ s/>/\\>/; if ( $scp->put($quoted) ) { # if ( $scp->put($_) ) { # etc
PS: desperately looking for a workaround to this embarassing situation I'm thinking of copying them to a temporary, "human-named" file before transferring them.
PS2: we have already cursed the author of the logs-writing program and its behaviour will certainly be fixed in the future, but unfortunately it's not doable soon...
Thank you in advance!
Edit by castaway - changed title from 'Q: re scp'
|
|---|