in my textfile.txt i have a data
=-============================================
% RandomFileSize, TotalFiles and FileSize are mutually exclusive options (first valid option is used).
%
/set_new_freespace 43
000 def % Kbytes of freespace the user wants on the disk
====================================================
I want that the my data become
/set_new_freespace 43000 def % Kbytes of freespace the user wants on the disk
using PERL script.
Can anyone help me..
I pleasure it so much if anybody want to help this problem
here my code .. but failed to backspace the 000.
use File::Copy;
#Specify the file
$file = "test.ps2";
$new_file = 'new.ps2';
copy($file, $new_file);
#Open the file and read data
#Die with grace if it fails
open (FILE, "<$new_file") or die "Can't open $file: $!\n";
@lines = <FILE>;
close FILE;
print "How much?";
my $i = <>;
my $tt='000';
#Open same file for writing, reusing STDOUT
open (STDOUT, ">$new_file") or die "Can't open $file: $!\n";
for ( @lines ) {
s/60000 /$i$tt /;
print;
}
#Finish up
close STDOUT;
=-============================================
% RandomFileSize, TotalFiles and FileSize are mutually exclusive options (first valid option is used).
%
/set_new_freespace 43
000 def % Kbytes of freespace the user wants on the disk
====================================================
I want that the my data become
/set_new_freespace 43000 def % Kbytes of freespace the user wants on the disk
using PERL script.
Can anyone help me..
I pleasure it so much if anybody want to help this problem
here my code .. but failed to backspace the 000.
use File::Copy;
#Specify the file
$file = "test.ps2";
$new_file = 'new.ps2';
copy($file, $new_file);
#Open the file and read data
#Die with grace if it fails
open (FILE, "<$new_file") or die "Can't open $file: $!\n";
@lines = <FILE>;
close FILE;
print "How much?";
my $i = <>;
my $tt='000';
#Open same file for writing, reusing STDOUT
open (STDOUT, ">$new_file") or die "Can't open $file: $!\n";
for ( @lines ) {
s/60000 /$i$tt /;
print;
}
#Finish up
close STDOUT;