Re: get last record in a file

2004-08-25 Thread balaji venkat
The following code will do the required task. #! /usr/bin/perl open (FILE,"test789.pl"); @array1 = ; $last = pop(@array1); print $last; --- Jeremy Kister <[EMAIL PROTECTED]> wrote: > On Wednesday, August 25, 2004 6:15 PM, I wrote: > > not extensively tested: > > this is a bit more tested:

Re: What is perl equivalent of scanf in C

2004-08-25 Thread balaji venkat
Hi, is available to take the keyboard input. Sample Program for you is #! /usr/bin/perl print "Enter the value:\n"; $a = ; print "The value of \$a is $a\n" Regards, V.Balaji. --- TapasranjanMohapatra <[EMAIL PROTECTED]> wrote: > All, > Can somebody let me know what is the Perl equivalen

Re: Appending array from HoA elements into one single array

2004-08-25 Thread balaji venkat
Hi Edward, Source Code : #! /usr/bin/perl %hash1 = ( A => ["fred", "barney"], B => ["George", "jane", "elroy"] ); foreach $sub (sort (keys(%hash1))) { print "$sub\n"; $temp = @hash1{$sub}; for ($i=0;$i<=$#$temp;$i++) {