R
rxl124
Hi,
quick question,
how would you assign a contents to file in perl
i was thinking
$filename=`echo newvalue > filename`;
would work, but it does not, can someone please let me know what
i am missing?
thanks in advance
part of the codes--------------------------------------------
#!/usr/bin/perl -w
$filename=`cat filename`;
print "\$filename has $filename \n";
if ($filename eq 'today') {
$file_value=tomorrow;
$filename=`echo tomorrow > filename`;}
else {
$file_value=today;
$filename=`echo today > filename`;
}
quick question,
how would you assign a contents to file in perl
i was thinking
$filename=`echo newvalue > filename`;
would work, but it does not, can someone please let me know what
i am missing?
thanks in advance
part of the codes--------------------------------------------
#!/usr/bin/perl -w
$filename=`cat filename`;
print "\$filename has $filename \n";
if ($filename eq 'today') {
$file_value=tomorrow;
$filename=`echo tomorrow > filename`;}
else {
$file_value=today;
$filename=`echo today > filename`;
}