Re: Reading and matching email ids

2007-04-25 Thread Saravana Kumar
Saravana Kumar wrote: yitzle wrote: You can read one list into an array (@list) and then loop through the other file ($item) and grep the list for the item. for ($item = ) { # or foreach print $item found if ( grep $item, @list ); } On 4/20/07, Saravana Kumar [EMAIL PROTECTED

Reading and matching email ids

2007-04-20 Thread Saravana Kumar
Hi list, I am testing a regex with email ids. I have a list of ids that i want to match against a one more list of ids. I have this: #! /usr/bin/perl $id=[EMAIL PROTECTED]; while() { chomp($_);print $_\t; print $id found\n if /$id/; print $id not found\n if ! /$id/; } and a file /tmp/sampleids

Re: Reading and matching email ids

2007-04-20 Thread Saravana Kumar
is that the $id that i am matching will also be read from another file. ie., a list of ids read one by one from a file and matched against another file which has another list. Thanks! for your time. SK Saravana Kumar wrote: Hi list, I am testing a regex with email ids. I have a list of ids

Re: Reading and matching email ids

2007-04-20 Thread Saravana Kumar
yitzle wrote: You can read one list into an array (@list) and then loop through the other file ($item) and grep the list for the item. for ($item = ) { # or foreach print $item found if ( grep $item, @list ); } On 4/20/07, Saravana Kumar [EMAIL PROTECTED] wrote: Boga Srinivas wrote

Removing file extension

2007-01-22 Thread Saravana Kumar
Hi list, I am trying to remove the extension from the a list of filenames and manipulate the names further. Tried to doing this: $file=~ s/\..*//; The above works fine. I get the result 'filename' if the filename is filename.ext. There are some files whose names are like file.name.ext and

Re: Removing file extension

2007-01-22 Thread Saravana Kumar
shaick mohamed wrote: Try this s/(.*)\..*/\1/; Thanks, Shaick. On 1/23/07, Saravana Kumar [EMAIL PROTECTED] wrote: Hi list, I am trying to remove the extension from the a list of filenames and manipulate the names further. Tried to doing this: $file=~ s/\..*//; The above works

Re: Coverting a big flat file

2006-08-17 Thread Saravana Kumar
Rob Dixon wrote: Saravana Kumar wrote: John W. Krahn wrote: Saravana Kumar wrote: I am new to the list and newbie in perl. I have a big flat file(100G). The file was supposed to be in a single line but many of records(as it has ^M). There are also ^@ and tabs in between

Re: Coverting a big flat file

2006-08-16 Thread Saravana Kumar
John W. Krahn wrote: Saravana Kumar wrote: Hi, Hello, I am new to the list and newbie in perl. I have a big flat file(100G). The file was supposed to be in a single line but many of records(as it has ^M). There are also ^@ and tabs in between. I want to first replace the control

Coverting a big flat file

2006-08-14 Thread Saravana Kumar
Hi, I am new to the list and newbie in perl. I have a big flat file(100G). The file was supposed to be in a single line but many of records(as it has ^M). There are also ^@ and tabs in between. I want to first replace the control characters and tabs with space. I tried this s/[[:cntrl:]\t]/