Re: Help me learn Closures.

2010-11-12 Thread John W. Krahn
Matthew Young wrote: I often read about closures being one of those 'end all beat all' programming techniques reserved for the most sophisticated and advanced gurus out there. Naturally, I want to learn how to use them, and use them effectively - I know perl supports them! I know its a sort of fu

Linux::Inotify2 - getting a list of watched objects

2010-11-12 Thread Chap Harrison
Hi folks, I don't see any way, through the Inotify2 interface at least, of getting a list of the 'watch' objects that an 'inotify2' object contains. I can use Data::Dumper to see the structure of an inotify2 object ... $VAR1 = bless( { 'w' => { '1' =>

Re: chromatic's "Modern Perl" book is out.

2010-11-12 Thread Sheppy R
Yes, follow the link, you can purchase a paper book. On Fri, Nov 12, 2010 at 5:18 PM, David Christensen < dpchr...@holgerdanske.com> wrote: > Shlomi Fish wrote: > >> chromatic's "Modern Perl" book is finally out and is available as free >> PDFs downloads: >> > > Is a book version available? > > >

Re: chromatic's "Modern Perl" book is out.

2010-11-12 Thread David Christensen
Shlomi Fish wrote: chromatic's "Modern Perl" book is finally out and is available as free PDFs downloads: Is a book version available? David -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Packages in Perl

2010-11-12 Thread Shawn H Corey
On 10-11-12 10:36 AM, Sooraj S wrote: Hi I am new to perl. I am trying to access a variable which is declared in a package. I have kept both the files in the same directory. But still my code errors out as ""$my_val" requires explicit package name". my_file.pl === #!/usr/bin

Re: Help me learn Closures.

2010-11-12 Thread Shlomi Fish
Hi Matthew, On Friday 12 November 2010 19:26:34 Matthew Young wrote: > I often read about closures being one of those 'end all beat all' > programming techniques reserved for the most sophisticated and > advanced gurus out there. Naturally, I want to learn how to use them, > and use them effective

Re: Packages in Perl

2010-11-12 Thread Shlomi Fish
Hi Sooraj, welcome aboard. On Friday 12 November 2010 17:36:54 Sooraj S wrote: > Hi I am new to perl. > > I am trying to access a variable which is declared in a package. I > have kept both the files in the same directory. But still my code > errors out as ""$my_val" requires explicit package na

Help me learn Closures.

2010-11-12 Thread Matthew Young
I often read about closures being one of those 'end all beat all' programming techniques reserved for the most sophisticated and advanced gurus out there. Naturally, I want to learn how to use them, and use them effectively - I know perl supports them! I know its a sort of functional programming co

Packages in Perl

2010-11-12 Thread Sooraj S
Hi I am new to perl. I am trying to access a variable which is declared in a package. I have kept both the files in the same directory. But still my code errors out as ""$my_val" requires explicit package name". my_file.pl === #!/usr/bin/perl use strict; use my_package; prin

Re: xls files in perl

2010-11-12 Thread Parag Kalra
>From professional experience, I would recommend: Spreadsheet::ParseExcel Cheers, Parag On Thu, Nov 11, 2010 at 7:09 AM, Anush wrote: > Is there any code for reading an xls file in perl. > I found the following code from net, but it does not work. Please help > me. > > > #!/usr/bin/perl -w >

Re: chromatic's "Modern Perl" book is out.

2010-11-12 Thread Parag Kalra
Thanks for the update Shlomi. Had already started reading this book (draft version) on your earlier recommendation. Will continue to it from this final version. Its a good book. Thanks once again for sharing the information. Cheers, Parag On Fri, Nov 12, 2010 at 5:50 AM, Shlomi Fish wrote:

chromatic's "Modern Perl" book is out.

2010-11-12 Thread Shlomi Fish
Hi all, chromatic's "Modern Perl" book is finally out and is available as free PDFs downloads: http://www.modernperlbooks.com/mt/2010/11/the-book-is-out.html I have read the book and can recommend it for beginners. I should note that both Yuval Kogman and I have contributed to the book's proo

Re: xls files in perl

2010-11-12 Thread Shlomi Fish
On Friday 12 November 2010 11:00:16 Uri Guttman wrote: > > "CY" == Chaitanya Yanamadala writes: > i don't know the excell stuff but your code needs to be improved a bit. > > > CY> my $oExcel = new Spreadsheet::ParseExcel; > > don't use camelcase names. if the leading 'o' is for object, do

Re: xls files in perl

2010-11-12 Thread Uri Guttman
> "CY" == Chaitanya Yanamadala writes: i don't know the excell stuff but your code needs to be improved a bit. CY> my $oExcel = new Spreadsheet::ParseExcel; don't use camelcase names. if the leading 'o' is for object, don't do that. hungarian notation is also a bad idea. CY> die "You

Re: xls files in perl

2010-11-12 Thread Chaitanya Yanamadala
Try this my $oExcel = new Spreadsheet::ParseExcel; die "You must provide a filename to $0 to be parsed as an Excel file" unless @ARGV; $filename = $ARGV[0]; if(!-e $filename){ $log_data .= $filename." ==> The File Does not exist at that location\n"; &file_write($log_file,$log_data);

Re: xls files in perl

2010-11-12 Thread Jim Gibson
At 7:09 AM -0800 11/11/10, Anush wrote: Is there any code for reading an xls file in perl. I found the following code from net, but it does not work. Please help me. #!/usr/bin/perl -w use strict; use Spreadsheet::Read; use Data::Dumper; my $xls = ReadData ("Input/sample.xls"); print $xls->[

xls files in perl

2010-11-12 Thread Anush
Is there any code for reading an xls file in perl. I found the following code from net, but it does not work. Please help me. #!/usr/bin/perl -w use strict; use Spreadsheet::Read; use Data::Dumper; my $xls = ReadData ("Input/sample.xls"); print $xls->[1]{'A1'}; exit; -- To unsubscribe, e-ma

Re: reading data from a file and put in a new file

2010-11-12 Thread Lynx RO
Hello Thanks a lot for your help, comment and sorry for my mistakes that I did not see first time that you solved my problems. Have a nice day On Tue, Nov 9, 2010 at 8:51 PM, Sheppy R wrote: > The "Global symbol "@val" requires explicit package name at test.pl ." > should be fixed by declaring