Re: Deleting last 10 lines of a file

2010-03-24 Thread sheela b
Thanks a lot Shlomi and Thomas. I will try with these methods. On Tue, Mar 23, 2010 at 7:13 PM, Shlomi Fish wrote: > Hi Sheela, > > On Tuesday 23 Mar 2010 15:06:24 sheela b wrote: > > Hi All, > > > > How to delete last 10 lines of a file using Perl one liner? >

Deleting last 10 lines of a file

2010-03-23 Thread sheela b
Hi All, How to delete last 10 lines of a file using Perl one liner? I used the following one liner to delete first 10 lines of a file, perl -i.bak -ne 'print unless 1..10' test.txt Regards Sheela

Re: evaluate for max and min value in array

2009-07-22 Thread sheela b
Hi Jenn, You can fing max and min value as, my @ar = (1,2,3,4,58,9,2,1); my $max = (sort { $b <=> $a } @ar)[0]; my $min = (sort { $a <=> $b } @ar)[0]; Regards Sheela On Wed, Jul 22, 2009 at 12:48 PM, Jenn G. wrote: > Hello, > > How to lookup the max and min value in an array? > Just like SQL's

Authorize.net Error

2009-05-16 Thread sheela b
Hi All, I have shopping cart website integrating with authorize.net for Payment gateway. Authorize.net is working fine in test mode, but in the live mode, i am not able to give any credits to customer. It displays following error message. "The referenced transaction does not meet the criteria

Redirect option

2008-10-16 Thread sheela b
Is there any option to redirect a URL in perl other than Location ? Regards Sheela