Re: help regarding Comparision of two lines

2007-09-29 Thread yitzle
#!/usr/bin/perl use warnings; use strict; # Make sure we got a valid file in $ARGV[0] die "Wrong usage\n" unless (defined $ARGV[0] and -f $ARGV[0]); open my $FH, "< $ARGV[0]" or die "Can't open $ARGV[0] : $!\n"; # I think it was #!... my $count = 0; my $linesPrinted = 0; while (<$FH>) { # Count

Re: help regarding Comparision of two lines

2007-09-27 Thread raaki
On 26 Sep, 20:38, [EMAIL PROTECTED] (Yitzle) wrote: > On 9/26/07, raaki <[EMAIL PROTECTED]> wrote: > > > > > > > hi friends > > > recently i started learning perl.i need to print some statements after > > perticular line.in my file there is one line called "puts > > conCheckFAIL#---"occuri

Re: help regarding Comparision

2007-09-26 Thread Dr.Ruud
yitzle schreef: > open my $FH, "< $ARGV[0]" or die "Can't open file\n"; open my $FH, "<", $ARGV[0] or die "Error opening '$ARGV[0]': $!\n"; -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.p

Re: help regarding Comparision

2007-09-26 Thread yitzle
Input: --- START --- abc def string1 das dsfa string2 dasf string1 string2 dfsdsf --- END --- Code: --- START --- #!/usr/bin/perl use warnings; use strict; die "Wrong usage\n" unless (defined $ARGV[0] and -f $ARGV[0]); open my $FH, "< $ARGV[0]" or die "Can't open file\n"; my $string1 = 0; # Tra

Re: help regarding Comparision of two lines

2007-09-26 Thread yitzle
On 9/26/07, raaki <[EMAIL PROTECTED]> wrote: > hi friends > > recently i started learning perl.i need to print some statements after > perticular line.in my file there is one line called "puts > conCheckFAIL#---"occuring number of times.i need to print some > statements after the 6th time

help regarding Comparision

2007-09-26 Thread raaki
hi friends i started learning perl recently and i need a help regarding Comparision.i need to write a perl script where it replaces so many strings and print some statements after a perticular lines of code. i need to compare a sequence of two lines in a file and as soon as this two lines occur se

help regarding Comparision of two lines

2007-09-26 Thread raaki
hi friends recently i started learning perl.i need to print some statements after perticular line.in my file there is one line called "puts conCheckFAIL#---"occuring number of times.i need to print some statements after the 6th time it occuered.can you help me with that puts \$conCheckF