in reply to Re^2: how to combine these two scripts in perl?
in thread how to combine these two scripts in perl?
If you have unwanted files left over, the solution to that is easy.
# script 1 use strict; use warnings; use Storable; my $storable_file = 'store.file'; $var = complicated multilevel structure; store(\$var,$storable_file); # script 2 use strict; use warnings; use Storable; my $storable_file = 'store.file'; my $var = retrieve($storable_file); unlink $storable_file; open my $outfile,'>','output.file'; print $outfile $var; close $outfile;
Only file created will be output.file.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: how to combine these two scripts in perl?
by dimitris852 (Acolyte) on Mar 15, 2016 at 16:25 UTC | |
by poj (Abbot) on Mar 15, 2016 at 17:11 UTC |