Re: Parsing Bounced Emails

2007-10-25 Thread Matthew Whipple
Nigel Peck wrote: > > Hi all, > > Just hoping someone might have some advice on what to use to parse > bounced emails and tell me what type of bounces they are, if they are > bounces at all. > > I tried... > > Mail::DeliveryStatus::BounceParser... it doesn't work > > bbounce.com... they don't exist

Re: Newbie question on substitution with Subroutines

2007-10-25 Thread Dr.Ruud
"minky arora" schreef: > my ($count,$count1,$count3,$count2); Consider: my @count; -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Help generating XML output

2007-10-25 Thread Dr.Ruud
"Jenda Krynicky" schreef: > I see. Well I'd probably get a little lost in all those braces for a > second so > > map { > $gen->user( {id => $ref->{$_}}, $_) > } keys %{$ref} > > would probably be better. You could write that as: map $gen->user( { id => $ref->{$_} }, $_ ), keys %$re

Re: Parsing Bounced Emails

2007-10-25 Thread Tom Phoenix
On 10/25/07, Nigel Peck <[EMAIL PROTECTED]> wrote: > Just hoping someone might have some advice on what to use to parse > bounced emails and tell me what type of bounces they are, if they are > bounces at all. > > I tried... > > Mail::DeliveryStatus::BounceParser... it doesn't work Maybe you need

Parsing Bounced Emails

2007-10-25 Thread Nigel Peck
Hi all, Just hoping someone might have some advice on what to use to parse bounced emails and tell me what type of bounces they are, if they are bounces at all. I tried... Mail::DeliveryStatus::BounceParser... it doesn't work bbounce.com... they don't exist, they just take your money and t

Re: Array Manipulation newbie

2007-10-25 Thread Tom Phoenix
On 10/25/07, Greg <[EMAIL PROTECTED]> wrote: > my @record = split (/\|/,$_); #split on '|' characters > My question comes in, how do I put the |'s back in the line in memory > so that I can continue with my working script? I think you're looking for join(), maybe something like this: my $li

Array Manipulation newbie

2007-10-25 Thread Greg
I have a similar issue as the other person with the same subject but with a twist.. I am reading an input file in that is pipe delimited and want to do manipulation on one of the fields. So far I have (and I'm only going to give you bits and pieces... unless requested) my @record = split (/\|/,

Re: Array Manipulation

2007-10-25 Thread Greg
Similar issue here, but with a twist. I have an input file that I'm reading in that is pipe delimited. (HL7 actually) So far I have my @record = split (/\|/,$_); I want to take $record[16] and replace it with $record[16] / $record[7] ONLY if $record[7] is not empty. I have this accomplished by $co

Re: Can't figure the regex

2007-10-25 Thread Randal L. Schwartz
> ""Jeff" == "Jeff Pang" <[EMAIL PROTECTED]> writes: "Jeff> There is an article on internet "How to Find or Validate an Email Address". "Jeff> I didn't check it carefully,but just a reference for you. "Jeff> http://www.regular-expressions.info/email.html Don't refer to it again, except as an

Re: Array Manipulation

2007-10-25 Thread asmith9983
Hi This will do what you want:- perl -le '@test=(1,2,3,4,5);print join "\n",@test;' The -l option ensures a final newline after the last element of the array is printed. The order of the options is important as changing it to "el" wouldn't work. -- Andrew Edinburgh,Scotland On Thu, 25 Oct

Re: Array Manipulation

2007-10-25 Thread [EMAIL PROTECTED]
On Oct 25, 4:21 pm, [EMAIL PROTECTED] (Ron Bergin) wrote: > > print $_,$/ for @test; Nothing wrong with that, but I usually write: print "$_\n" for @test; TMTOWTDI! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Modifing Text Files

2007-10-25 Thread Chas. Owens
On 10/25/07, Joseph L. Casale <[EMAIL PROTECTED]> wrote: > I need to make some edits on small (~30 lines) text files. From reading > perldoc and > recent posts, am I correct in understanding that the proper way is to read > the file in > through one handle and write it out through another? If tha

Modifing Text Files

2007-10-25 Thread Joseph L. Casale
I need to make some edits on small (~30 lines) text files. From reading perldoc and recent posts, am I correct in understanding that the proper way is to read the file in through one handle and write it out through another? If that is the case, I suppose I need to write in some code then to writ

Re: Newbie question on substitution with Subroutines

2007-10-25 Thread Paul Lalli
On Oct 25, 12:01 pm, [EMAIL PROTECTED] (Minky Arora) wrote: > I need to make multiple substitutions in a file.There could be a > situation where there are more than one substitution on a single > line.I want to count the total # of substituitions.I need to use > subroutines: Says who? Is this a h

Re: Array Manipulation

2007-10-25 Thread Ron Bergin
On Oct 25, 1:59 am, [EMAIL PROTECTED] (Irfan Sayed) wrote: > Hi All, > > I have one array say my @test=(1,2,3,4,5); > if I print this array it will print like this > print "@test\n"; > and the output is > 1 2 3 4 5 > > now my req. is that I want to store these array values in another array > in suc

Newbie question on substitution with Subroutines

2007-10-25 Thread minky arora
Hi Team, I need to make multiple substitutions in a file.There could be a situation where there are more than one substitution on a single line.I want to count the total # of substituitions.I need to use subroutines: I have 3 questions: 1) Do I have to make 3 separate Regex.How can it be done in

Re: Inappropriate ioctl for device

2007-10-25 Thread Tom Phoenix
On 24 Oct 2007 18:35:15 -, leo shen <[EMAIL PROTECTED]> wrote: > Hi, I ran into "Inappropriate ioctl for device" when running the > following two lines: > > my $file=shift @ARGV || File::Spec->catfile(q(.),q(a.res)); > open (INPUT,'<', $file) or die " can't open $file : $!"; Which line was it

Re: Another noobie question about perl on Windows - perl running in background

2007-10-25 Thread Matthew Whipple
Ayesha wrote: > Hi all > > Thanks to all who replied to my question yesterday. I am using perl- > express IDE to write a small perl code. Sometimes the code runs for a > long time (infinite loop logical error), I close the editor but > realize that the computer is suddenly running slow. So I have t

RE: Array Manipulation

2007-10-25 Thread Sayed, Irfan (Irfan)
Hi, This is the code I am using which I got from Dyana. my @test1 = map($_."\n", @test); print @test1, "\n"; but the issue is that in my array , the values are something like this. M:\isayed_aic_8.0_int\vob1\34er@@\main\IC_8.0_Integration\7 M:\isayed_aic_8.0_int\vob1\test\New Text Document(2)

Re: Array Manipulation

2007-10-25 Thread Gunnar Hjalmarsson
Sayed, Irfan (Irfan) wrote: I have one array say my @test=(1,2,3,4,5); if I print this array it will print like this print "@test\n"; and the output is 1 2 3 4 5 now my req. is that I want to store these array values in another array in such a fashion where I can print like 1 2 3 4 5 so I me

Re: How do I replace a part of huge text file

2007-10-25 Thread Ron Bergin
On Oct 22, 1:52 am, [EMAIL PROTECTED] (Anand Shankar) wrote: > Hi, > > I would like to replace a part of a really big (4GB) text file. And > the contents that I want to change is really a small but continuous > portion. Could some one please help me with the best way I can do this > in perl? > > Th

Re: Array Manipulation

2007-10-25 Thread Dyana Wu
On 25 Oct 2007, at 4:59 PM, Sayed, Irfan (Irfan) wrote: Hi All, I have one array say my @test=(1,2,3,4,5); if I print this array it will print like this print "@test\n"; and the output is 1 2 3 4 5 so I mean to say that if I type print "@test1\n"; then output should come as 1 2 3 4 5 Try ma

Array Manipulation

2007-10-25 Thread Sayed, Irfan (Irfan)
Hi All, I have one array say my @test=(1,2,3,4,5); if I print this array it will print like this print "@test\n"; and the output is 1 2 3 4 5 now my req. is that I want to store these array values in another array in such a fashion where I can print like 1 2 3 4 5 so I mean to say that if I t

Re: Absolute noobie question regarding opening files on Windows platform

2007-10-25 Thread Ron Bergin
On Oct 23, 6:57 am, [EMAIL PROTECTED] (Paul Lalli) wrote: > On Oct 23, 12:27 am, [EMAIL PROTECTED] (Ayesha) wrote: > > > I was not in the right directory, but I learnt about forward and > > backward slashed also. Thanks to all who replied > > Arg. This is exactly what I was afraid of. The post ab

Re: Absolute noobie question regarding opening files on Windows platform

2007-10-25 Thread Ron Bergin
On Oct 23, 6:57 am, [EMAIL PROTECTED] (Paul Lalli) wrote: > On Oct 23, 12:27 am, [EMAIL PROTECTED] (Ayesha) wrote: > > > I was not in the right directory, but I learnt about forward and > > backward slashed also. Thanks to all who replied > > Arg. This is exactly what I was afraid of. The post ab

Inappropriate ioctl for device

2007-10-25 Thread leo shen
Hi, I ran into "Inappropriate ioctl for device" when open a file on the local drive, i have write, read privileges on it. my $file=shift @ARGV || File::Spec->catfile(q(.),q(a.res)); open (INPUT,'<', $file) or die " can't open $file : $!"; I do not understand what is wrong? thanks for your attent

Inappropriate ioctl for device

2007-10-25 Thread leo shen
Hi, I ran into "Inappropriate ioctl for device" when running the following two lines: my $file=shift @ARGV || File::Spec->catfile(q(.),q(a.res)); open (INPUT,'<', $file) or die " can't open $file : $!"; I basic want to open a file on the local drive, the file can be write read and execute. --