Re: Gigantic file size processing error
In article 1388676082.98276.yahoomail...@web193403.mail.sg3.yahoo.com, mani_nm...@yahoo.com (mani kandan) wrote: Hi, We have file size of huge size 500MB, Need to Manipulate the file, some replacement and then write the file, I have used File::slurp and works for file size of 300MB (Thanks Uri) but for this huge size 500MB it is not processing and come out with error. I have also used Tie::file module same case as not processing, any guidance. regards Manikandan Hi, have you try this kind of command : perl -p -i -e s/oneThing/otherThing/g yourFile hang or not ? and, 500MB is not a gigantic file :) -- klp -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: begining
In article camo7_vsxsgoe+8itsndomc9kad5omghb+gcinf8dxn5prbp...@mail.gmail.com, rahim.g.fa...@gmail.com (Rahim Fakir) wrote: Can someone tell me or give a adress to programs like hello world or similar, for practice. Iam beging practice programming, and bought a book of perl, but i need program to practice can someone give me a hand. Best Regards Ray of course : http://bit.ly/10mgCjk -- klp -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: 2 dimensions array
In article 4ee54abf.6080...@gmail.com, shawnhco...@gmail.com (Shawn H Corey) wrote: Try: push @Cylinders, [ $1, $2 ]; This will put the two captured variables in an anonymous array and push it onto @Cylinders. so simple !! thanks :) -- klp -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
2 dimensions array
Hello, I want to have a two dim array. I build it like this: my @Cylinders; /.*(.*),(.*).*/; push @{$Cylinders[0]}, $1; push @{$Cylinders[1]}, $2; Seems to work but a get an array with '2' lines and 'n' columns instead of 'n' lines with '2' columns'. display array with 'print Dumper \@Cylinders;' confirm this. where is my mistake ? thank if you can help me. -- klp -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: help with array elements
In article AANLkTi=afy09dh8c2f3tmncjcm4om1ihgutacaln_...@mail.gmail.com, ashwint...@gmail.com (ashwin ts) wrote: Hi, I am a newbie to perl. I have an array which has few elements like '1,2,3,4,2,3,1,2,1,1,1,4,6,7' i need to know how many times each element has occurred in the same array. for example 1-5 times 2-3 times... could some one throw some light on how i can do this. thanks in advance.. Regards Ashwin Thayyullathil Surendran quick write, not tested : my @array = (1,2,3,4,2,3,1,2,1,1,1,4,6,7); my @freq; for (@array) { $freq[$_]++;} my $i=0; for (@freq) { print $i : $_ times\n; $i++; } -- klp -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/