in reply to Using scalars as a file data?
Prints:my $variable = "HELLO world\nhow are you?\n"; open(my $fh, '<', \$variable); print $_ for (<$fh>);
Although this wont work if the CPAN module only takes a filename, but usually modules that take a filename will also accept a file handle like the one created above.HELLO world how are you?
|
|---|