RE: Is there a quicker way to do this

2003-03-14 Thread Aimal Pashtoonmal
Hello, I am about to finish a perl script but it takes very long to run as I am using three foreach loops one after the other. I have three files with data passed into hashes: FileA keyA = 12345 valueA = abcdefgh FileB keyB = 67890 valueB = ijklmno FileC keyC = 12345:67890 (

Re: Is there a quick and easy way to indroduce random deletions

2003-03-13 Thread Aimal Pashtoonmal
Thanks all. The item below works. I did not know one could use rand in that way. cheers. aim. = Rob Dixon wrote: > Aimal Pashtoonmal wrote: > > Hi, > > > > Does anyone know how I can go about introducing a single random

RE: Is there a quick and easy way to indroduce random deletions

2003-03-13 Thread Aimal Pashtoonmal
Hi, Does anyone know how I can go about introducing a single random deletion. I have file containing blocks of alphabet each block with a uniq tag. I have passed this into a hash where the tags are the keys and values are the blocks. Is there a quick and easy way to randomly remove a single lette

Re: Trouble with pattern matching

2003-03-11 Thread Aimal Pashtoonmal
Hi, I would have thought the curley braces are the problem, have you tried the following line: $line =~ s/background(\s?)(=?)(\"?)(.*?)(\"?)\s/background=$tosubstitute/i; aim. === Francesco del Vecchio wrote: > I have this str

Re: how to concat files easily?

2003-03-10 Thread Aimal Pashtoonmal
Hi, I am not sure if it is what you want, but why not do it on the command line with the cat command? or may be use this oneliner "perl -e '{print `cat *.infiles`}' > out_file" or something similar. May be you could capture what you want using backticks and the above within your perl script. hop

RE: Simple script requires simple soulution

2003-03-04 Thread Aimal Pashtoonmal
Hello, I have the script below giving the folowing error meesages. =>Useless use of string in void context at extract_data_from_IPR_HMM_libs.pl line 12. =>Useless use of a constant in void context at extract_data_from_IPR_HMM_libs.pl line 13. Even though the script works and I ge

RE: STILL NEEW SOME HELP: Using data structures to find similarities and differences

2003-03-03 Thread Aimal Pashtoonmal
Hello, I have three files, for two different cites. The first file contains names of men with their faves, in columns. The second file is the same but for their partner. The third file is a list of similar partners (partner selection based on data fed into a perl script): FILE_1 and FILE_2 column

RE: Using data structures to find similarities and differences

2003-03-02 Thread Aimal Pashtoonmal
Hello, I have three files, for two different cites. The first file contains names of men with their faves, in columns. The second file is the same but for their partner. The third file is a list of similar partners (partner selection based on data fed into a perl script): FILE_1 and FILE_2 column

Re: regex to capture all combinations of .. and [ ]

2003-02-27 Thread Aimal Pashtoonmal
-we 'print if /\s[\[\].]{2}\s/;' file | more cheers a lot, aim = Stefan Lidman wrote: > Hi > > Try > > % perl -n -we 'print if /[\[\].]{2}/;' file > > or > > % grep -P "[\[\].]{2}" file &g

RE: regex to capture all combinations of .. and [ ]

2003-02-27 Thread Aimal Pashtoonmal
Hello, I am trying to use command line grep and perl regex to capture all combinations of the following, but I am not getting everything: somethingdigits/digits digitsdigits..digits digits..digitsdigits.digits somethingdigits/digits digitsdigits..

Re: printing fields without the use of awk

2003-02-27 Thread Aimal Pashtoonmal
Hi, sorry that print statement should read: "print "$payroll[1] $payroll[0]\n"; regards, aim -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: printing fields without the use of awk

2003-02-27 Thread Aimal Pashtoonmal
Dear Mr Jackson, I am no perl expert, and I am sure other perl people will come up with another way- as there always is with perl, but it seems this print statement should do the trick (untested): "print "$payroll [1] $payroll [0]\n"; brady

RE: help with nearly identical hash keys

2003-02-25 Thread Aimal Pashtoonmal
Hello people, Can any one please help me. I have 2 hashes, hashA and hashB, the keys in both cases, are made up of a mixture of numbers and words etc. But the keys are differnt so I presume I cannot use if exits or if defined. Is there anyway of check to see if the words and numbers making up the

Re: Realised my mistake - This is really really simple

2003-02-20 Thread Aimal Pashtoonmal
Dear all, In regards to the problem below, I realised my mistake. cheers Aimal Pashtoonmal wrote: > Hello there, > > This is a really simple question. I just cannot see what I am doing > wrong. > > I have a file either beginn

RE:This is really really simple

2003-02-20 Thread Aimal Pashtoonmal
Hello there, This is a really simple question. I just cannot see what I am doing wrong. I have a file either beginning with "#" or an alphabet. I am trying to use simple command stuff to print lines not beginnning with "#", but I just cannot think at the moment. I can easily do search for lines b

RE: Help with printing 2 files into 1

2003-02-17 Thread Aimal Pashtoonmal
Dear folks, I have 2 files each contain a column of data, I want to combine them into 1 file with the 2 columns next to each other, eg: file_1: 12 13 14 3 file_2: 3 45 34 56 desired output: 12 3 13 45 14 34 3 56 chrs, amal. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For ad

RE: help me please

2003-01-30 Thread Aimal Pashtoonmal
Dear folks, Can you please recommend possible pointers to my problem. I have a number of perl programs which worked on a large set of txt files, each program producing its own output for each of the files. I then put together a summary file of worth while results from these output files. All this

RE: one line perl

2003-01-24 Thread Aimal Pashtoonmal
Hi, I am trying to get the following one liner to work, but the figure from the subtraction is printed after column 6 and column 7 and 8 are discarded. What I am trying to do is create an extra column after column 6 for the subtraction and retain the last two columns: perl -F'\t' -lane 'pri