in reply to Re^3: Using Perl FTP to write a string variable as a file
in thread Using Perl FTP to write a string variable as a file

Try using a lexical filehandle

open( my $FH, "<", \$content ) or die "Kann File Handle nicht zum lesen aus content oeffnen"; . . $ftp->put( $FH, $remotefilename ) or die "put failed (Passive=$passive) ", $ftp->message, "; local +filename(FH): [$localfilename], remotefilename: [$remotefilename]"; $ftp->quit; close( $FH );
poj

Replies are listed 'Best First'.
Re^5: Using Perl FTP to write a string variable as a file
by toohoo (Beadle) on Dec 22, 2014 at 13:52 UTC

    Dear poj,

    many thanks, this works in my test script now. will try to move this to my live script.

    Thanks again and best regards, Thomas

    PS: I guess a :

    binmode( $FH );

    ... after open will be processed correctly