Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
I DONT KNOW ABT MENTOR AMPLE.
BUT U CAN DO FILE MANIPULATION AS SHOWN IN THE PERL PROGRAM BELOW.
THIS IS ACTUALLY FOR WRITING INTO A FILE. TRY IF IT WORKS
#!/usr/bin/perl -w
#purpose
#writes to a file
use Getopt::Long
#Set up the command line to accept a filename
my $ret = GetOptions (" i | input:s ", " o | output:s ");
my $input = $opt_i || die "Usage: $O -i Input filename -o Output filename\n";
my $output = $opt_o || die "Usage: $O -i Input filename -o Output filename\n";
#opent the input file
open (INPUT,"$input") || die "Could not open file $input: $!\n";
#open the output file
open (OUTPUT,">$output") || die "Could not open file $output: $!\n";
#start reading from the input file
while (<INPUT>)
{
chop;
#write to the output filename
print OUTPUT "Line $. = <$_>\n";
}
#close the files
close (INPUT);
close (OUTPUT);
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.