Im a Hardware engineer, I have written this script to automate my job. I got stuck in the following location.
CODE:
In the above code, for every $key value, I'm calling the create_verilog() function for replacing some of the strings in the array. But it repalces only with the first key. Even though $key is passing properly to the subroutine.
Any urgent help??
Thanks,
rIZ
Last edited by Franklin52; 06-09-2010 at 08:44 AM..
Reason: Please use code tags!
i've reworked some code from an earlier post, and it isn't working as expected
i've simplified it to try and find the problem. i spent hours trying to figure out what is wrong, eventually thinking there was a bug in perl or a problem with my computer. but, i've tried it on 3 machines with the... (5 Replies)
Hi All,
I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text.
An example of 4 lines in my file is:
1. MatchText_randomNumberOfText moreData ReplaceMe moreData
2. MatchText_randomNumberOfText moreData moreData... (4 Replies)
Hi i am trying to write a perl program where i have to open a
1)directory "unit"
2) rename the files in the dir say file1.txt;file2.txt...file5.txt
to file1_a.txt;file2_a.txt,....file5_a.txt ;file1_x.txt ;file2_x.txt
3) open these renamed files and replace the words
lets say file1_a.txt... (7 Replies)
Hi,
I have thousands of files in a directory that have the following 2 formats:
289620178.aln
289620179.aln
289620180.aln
289620183.aln
289620184.aln
289620185.aln
289620186.aln
289620187.aln
289620188.aln
289620189.aln
289620190.aln
289620192.aln....
and:
alnCDS_1.fasta (1 Reply)
in one of my script..I have some thing like
john:christina : one::
and i want to make it like
john:chritina:two:(date command):jackey:
basically change 'one' to 'two' and run date :command and add other name: (30 Replies)
Hi, could anyone help me with this, tried several times but still not getting it right or having enough grounding to do it outside of javascript: Using awk or sed or bash: need to go through a text file using a for next loop, replacing substrings in the file that consist of a potentially multi... (3 Replies)
Learning, stumbling! My progress in shell scripting is slow. Now I have this doubt:
I have the following file (users.txt):
AU0909,on
AU0309,off
AU0209,on
AU0109,off
And this file (userson.txt)
AU0909
AU0209
AU0109
AU0309
I just want to set those users on userson.txt to "off" in... (14 Replies)
Hello,
I am using sed in a for loop to replace text in a 100MB file. I have about 55,000 entries to convert in a csv file with two entries per line. The following script works to search file.txt for the first field from conversion.csv and then replace it with the second field. While it works fine,... (15 Replies)
HEllo!!
I need a script in perl that see inside a file(file.txt) that has only one row.
The row contains only this text:
logs_yearly = 20120628113345
I want that the script does this:
"Search in the file, if the date 20120628 is actual date"
Thank you!!
---------- Post... (4 Replies)
Experts - Any advice on how to get a hash value in a foreach loop?
Values print correctly on standalone print statements, but I can't access value
in foreach loop.
See sample code below and thanks in advance.
foreach my $z (sort keys %hash) {
for $y (@{$hash{$z}}) {
print "$z... (6 Replies)