Re: Getting the length of an array that is a reference...

2001-08-31 Thread Aravindan . Sundaram
You can also use $#{$array} to get the length.. Hamish Whittal To: perl beginners

Re: Formatting text

2001-08-28 Thread Aravindan . Sundaram
Hope you have a file which contains these lines, Just check below code : $File = "sample.txt"; open(IN,"<$File"); while() { $_ =~ s/\x0d//g; if( $_ =~ m/play/i ) { $Result = ""; while( $_ =~ /.{0,5}play.{0,5}/i ) { $Result .= $`;