Re: split log file

2010-10-16 Thread Parag Kalra
use strict; use warnings; my %log; while(){ chomp; my ($key, $value) = split /;/, $_; push @{$log{$key}}, $value; } foreach my $k (keys %log){ open my $k_fh, '>', "$k.log" or die "Could not open the file - $k.log : $! \n"; foreach my $v (@{$log{$k}}) { print $k_f

Re: Problem reading files

2010-10-16 Thread Parag Kalra
Hi Kryten, Could you please post a sample content of the file and the actual content that is being displayed by the script on your editor. Also kind send the output of following script and check if its same as your previous output. #!/usr/bin/perl use strict; use warnings; use diagnostics; #ope

Re: perl real life exercise

2010-10-16 Thread brian d foy
In article , Agnello George wrote: > Is there any site or any book other than "learning perl" where i would get > real life exercises on perl scripting. The Learning Perl Student Workbook has additional exercises for each chapter in Learning Perl: http://www.amazon.com/Learning-Perl-Student-Wo

Re: Problem reading files

2010-10-16 Thread Shlomi Fish
Hi Kryten, On Friday 15 October 2010 08:42:07 Kryten wrote: > Hi, > I'm hitting a strange problem running simple perlscript on my new > laptop. > > To illustrate:- > > #!/usr/bin/perl > use strict; > use warnings; > use diagnostics; > > open my $configuration, 'H:\temp.txt' or die "my error: $!

Re: split log file

2010-10-16 Thread Shlomi Fish
On Thursday 14 October 2010 16:54:32 yo RO wrote: > Hello I need to split a log file per days > I have a file in txt format and I want to create a file with all data > from one day in one file > I will give example > > I have this imput > 3_21_2010;11:12\\trafic info > 3_21_2010;11:34\\trafic info

Re: split log file

2010-10-16 Thread Rob Coops
On Thu, Oct 14, 2010 at 4:54 PM, yo RO wrote: > Hello I need to split a log file per days > I have a file in txt format and I want to create a file with all data > from one day in one file > I will give example > > I have this imput > 3_21_2010;11:12\\trafic info > 3_21_2010;11:34\\trafic info >

Re: Extract Javascript

2010-10-16 Thread Rob Coops
On Thu, Oct 14, 2010 at 7:48 PM, bones288 wrote: > what should I look into for extracting javascript from a webpage: > > http://www.costofwar.com/ > > I want to periodically check the counter but I'll I can see is: > >

Re: patch for MIME::Lite

2010-10-16 Thread fake...@fakessh.eu
Le 13.10.2010 13:24, fakessh a écrit : > > hello my friends > hello perl gurus > hello professor > > > So , I'm working on MIME::Lite and when looking on google TLS MIME::Lite > debugging post > we must see any posts referring to me . > i am the cat who lives at 6 . > i'm working on a patch to

Javascript extraction

2010-10-16 Thread bones288
Hello, I'm looking to read the counter at: http://www.costofwar.com/ But the get() function will only extract the html code of the page and not the dynamic javascript. Do you know how I can read the counter in perl? Thanks, Bones -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For

Problem reading files

2010-10-16 Thread Kryten
Hi, I'm hitting a strange problem running simple perlscript on my new laptop. To illustrate:- #!/usr/bin/perl use strict; use warnings; use diagnostics; open my $configuration, 'H:\temp.txt' or die "my error: $!" ; my @info = <$configuration> ; chomp (@info); foreach my $i (@info) { print "$i\n

Re: map HoAoA

2010-10-16 Thread Mike McClain
On Tue, Oct 12, 2010 at 11:48:03PM -0700, John W. Krahn wrote: > Shlomi Fish wrote: > > > >On Wednesday 13 October 2010 06:39:03 Mike McClain wrote: > >> I've looked at this for a few days but still can't see 'why' > >>I get what I do. > >>Why do @arrays and @seconds not have the same number of

Re: patch for MIME::Lite

2010-10-16 Thread fake...@fakessh.eu
Le 13.10.2010 13:24, fakessh a écrit : > > hello my friends > hello perl gurus > hello professor > > > So , I'm working on MIME::Lite and when looking on google TLS MIME::Lite > debugging post > we must see any posts referring to me . > i am the cat who lives at 6 . > i'm working on a patch to

Extract Javascript

2010-10-16 Thread bones288
what should I look into for extracting javascript from a webpage: http://www.costofwar.com/ I want to periodically check the counter but I'll I can see is: So I don't 'see' the changing counter number. Any ideas? -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional comm

split log file

2010-10-16 Thread yo RO
Hello I need to split a log file per days I have a file in txt format and I want to create a file with all data from one day in one file I will give example I have this imput 3_21_2010;11:12\\trafic info 3_21_2010;11:34\\trafic info 3_21_2010;13:21\\trafic info 3_22_2010;11:12\\trafic info 3_22_20

Re: patch for MIME::Lite

2010-10-16 Thread fake...@fakessh.eu
Le 13.10.2010 13:24, fakessh a écrit : > > hello my friends > hello perl gurus > hello professor > > > So , I'm working on MIME::Lite and when looking on google TLS MIME::Lite > debugging post > we must see any posts referring to me . > i am the cat who lives at 6 . > i'm working on a patch to

Re: Disadvantages of "our" v. "my" when declaring variables

2010-10-16 Thread Shlomi Fish
Hi Brandon, Just a note about your code: On Saturday 16 October 2010 06:53:29 Brandon McCaig wrote: > sub print_sum > { > my ($a, $b) = @_; > > print($a + $b, "\n"); > } You should not call lexical variables "$a" and "$b" because this interferes with the "$a" and "$b" http://perldoc.pe