Re: Deleting Lines From File

2012-04-09 Thread Binish A.R
So these files contain email addresses or something else? In any case, you may store the line number of the last read email address in a separate file, say status.log. When the process starts, check for the existences of this file, and read the content ( may be last line or first line, depends on

Re: Help parsing tab delimited files

2012-04-08 Thread Binish A.R
replace     @array = split (/\t/, $_);  with               @array = split;   From: Tiago Hori To: beginners@perl.org Sent: Monday, April 9, 2012 6:42 AM Subject: Help parsing tab delimited files Hi Guys, I know there are modules for parsing tab delimited fi

Re: regex

2012-04-08 Thread Binish A.R
if you are  looking for the regex only solution, then you may try this $word =~ /^((un|in).{3}|non.{2})$/   From: Binish A.R To: "som@gmail.com" ; "beginners@perl.org" Sent: Sunday, April 8, 2012 6:19 PM Subject: Re: regex Why

Re: regex

2012-04-08 Thread Binish A.R
Why don't you check the length of the string as well .. ie if (length($word) ==  5 && $word =~ /^(un|in|non).+$/) {  ## Do something }   From: Somu To: beginners@perl.org Sent: Sunday, April 8, 2012 4:30 PM Subject: regex Hello everyone... Thanks for the pre

Re: foreach and next

2012-04-08 Thread Binish A.R
Enclose DBI operation inside eval - #!/usr/bin/perl use strict; use warnings; use DBI; use DBD::mysql; foreach $db (&hostdb("$project")) { eval {         my $server = "$db";         my $dbname = "information_schema";         my $port = "3306";         my

Re: parsing data

2011-12-20 Thread Binish A.R
catch    From: John W. Krahn To: Perl Beginners Sent: Wednesday, December 21, 2011 12:25 PM Subject: Re: parsing data Binish A.R wrote: > If you can guarantee the order in which the keys appear, you may not have to > build a hash to hold the entire data. &

Re: parsing data

2011-12-20 Thread Binish A.R
If you can guarantee the order in which the keys appear, you may not have to build a hash to hold the entire data. Instead you can read block by block and print the result. -- my $csno; while (<>) {         chomp;         s/^\s+//g; s/\s+$//g;                     ### weed out all whitespaces    

Re: issue with perl map function

2011-12-03 Thread Binish A.R
Isn't this all as simple as a split on each element? Something like: @sympd_dev_list = map { (split(/\s+/, $_)[1] } @sympd_list;   http://www.gnome.org/friends/banners/associate.png"; alt="Become a Friend of GNOME" border="0" /> From: "sunita.prad...@emc.com"