Pdf to Excel

2011-04-16 Thread muthukumar swamy
I am trying to convert the tables in pdf to Excel. I am using CAM::Pdf module for reading the text from Pdf. please suggest me anyone for other way for converting PDF to Excel. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http

Auto-numbering in perlpod

2011-04-16 Thread Parag Kalra
Hi, While creating POD for modules in Perl, I often specify numbered list 1. Parameter1 2. Parameter2 3. Parameter3 .. ... etc or 1. It does this 2. It also does that 3. But it won't do this ... .. etc Currently the numbered list is hard-coded (i.e numbers 1, 2, 3 etc). Can I make it auto-incr

Re: help in scripting

2011-04-16 Thread John W. Krahn
[ Please do not top-post. TIA ] tianjun xu wrote: This works. #!/usr/bin/perl use strict; use warnings; my %hash=(); while(<>){ chomp(my $line=$_); my($col1, $col2)=split(/\s+/, $line); Or just: while ( <> ) { my ( $col1, $col2 ) = split; push(@{ $hash{$

Re: help in scripting

2011-04-16 Thread John W. Krahn
Shlomi Fish wrote: On Saturday 16 Apr 2011 09:06:02 Gurunath Katagi wrote: hi .. i am new to perl .. i have a input file something pasted as below .. 16 50 16 30 16 23 17 88 17 99 18 89 18 1 .. -- and i want the output something like this : 16 50 30 23 17 88 99 18 99 1 i.e for each values in

Re: move array elements to hash

2011-04-16 Thread John W. Krahn
mark baumeister wrote: Hi, Hello, I am trying to move array elements (populated from the) into a hash as pairs [i] and [i + 1] and then print them out using the code below. If I enter "bob" as the first element and hit enter I get the error messages below. I guess there are multiple problems

Re: format output from system command

2011-04-16 Thread Peter Scott
On Fri, 15 Apr 2011 08:53:12 -0700, sono-io wrote: > On Apr 15, 2011, at 8:37 AM, Alan Haggai Alavi wrote: > >>> open ('FILEOUT', '>>', 'cmdout') ||die "cant open cmdout: $! \n"; >>> >>> Is that O.K.? >> >> You are still using a bareword filehandle. > > Putting single quotes around t

Re: Alternative to goto

2011-04-16 Thread Peter Scott
On Fri, 15 Apr 2011 08:48:10 -0400, shawn wilson wrote: > but, sense it is jumping to a different place in the stack, isn't it > more efficient than doing the above mentioned > > my $done = 0; > while( !$done ){ >$done = 1 if( contition ); >do_work; > } > > vs > > for(;;) { >goto DON

Re: help in scripting

2011-04-16 Thread Uri Guttman
> "tx" == tianjun xu writes: tx> my %hash=(); no need to initialize that to (). tx> while(<>){ tx> chomp(my $line=$_); why read the line into $_ and then copy it? while( my $line = <> ) { also please don't quote entire long emails. quote the needed part and put your code

Re: Padre IDE

2011-04-16 Thread Rob Dixon
On 14/04/2011 20:40, mark baumeister wrote: I'm trying to use the Padre IDE for perl. From what I have read I guess it is not really a bonified IDE. However, I have read that one can at least use it to debug your code. It also has a feature to run your scripts. I have tried both of this function

Re: move array elements to hash

2011-04-16 Thread Rob Dixon
On 14/04/2011 20:29, mark baumeister wrote: Hi, I am trying to move array elements (populated from the) into a hash as pairs [i] and [i + 1] and then print them out using the code below. If I enter "bob" as the first element and hit enter I get the error messages below. I guess there are multiple

Re: help in scripting

2011-04-16 Thread Shawn H Corey
On 11-04-16 11:06 AM, tianjun xu wrote: print "$key"; for (@{ $hash{$key} }){ print " $_"; } print "\n"; Try: print "$key @{$hash{$key}}\n"; -- Just my 0.0002 million dollars worth, Shawn Confusion is the first step of understanding.

Re: WMI

2011-04-16 Thread John Mason Jr
On 4/16/2011 9:00 AM, Mike Flannigan wrote: I used to run this script and it worked fine. Now is gives error Can't locate WMI.pm in @INC . . . Sure enough the module is gone and I can't find it in ActiveState ppm. Anybody know what happened to this module? I Googled and couldn't find the answe

Re: help in scripting

2011-04-16 Thread tianjun xu
This works. #!/usr/bin/perl use strict; use warnings; my %hash=(); while(<>){ chomp(my $line=$_); my($col1, $col2)=split(/\s+/, $line); push(@{ $hash{$col1} }, $col2); } for my $key (sort keys %hash){ print "$key"; for (@{ $hash{$key} }){ p

Re: WMI

2011-04-16 Thread Shawn H Corey
On 11-04-16 10:09 AM, Alan Haggai Alavi wrote: Hello Mike, Sure enough the module is gone and I can't find it in ActiveState ppm. It is not found in CPAN either. Regards, Alan Haggai Alavi. But DBD::WMI is: http://search.cpan.org/~corion/DBD-WMI-0.06/lib/DBD/WMI.pm -- Just my 0.0002

Re: WMI

2011-04-16 Thread Alan Haggai Alavi
Hello Mike, Sure enough the module is gone and I can't find it in ActiveState ppm. It is not found in CPAN either. Regards, Alan Haggai Alavi. -- The difference makes the difference -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl

Re: Question regarding XML::Twig and parsing subelements of an XML-Tree

2011-04-16 Thread Werner
Hi, that did the trick: @directors = $elt->first_child('DIRECTOR_LIST')->children_text('DIRECTOR'); now, every director is listet in @directors-array =) Bye, Werner -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.

Re: Question regarding XML::Twig and parsing subelements of an XML-Tree

2011-04-16 Thread Werner
Hi, # something like the following also doesn't work :( @directors = $elt->first_child('DIRECTOR_LIST')->children('DIRECTOR'); i get the following error: "Can't call method "first_child" on an undefined value at test.pl line 53." regards, Werner -- To unsubscribe, e-mail: beginners-unsubscr..

Question regarding XML::Twig and parsing subelements of an XML-Tree

2011-04-16 Thread Werner
Hi everybody, this XML-thing ist currently driving me nuts :) let's assume i have the following XML-Tree as input: # - file.xml --- # Name of the Movie 28372382 This is a long description s

Re: hash troubles

2011-04-16 Thread Shawn H Corey
On 11-04-15 12:25 AM, dbro wrote: if (! $hash{$_} ) { %hash = ( $_ => $count ); } else { $hash{$_} = $hash{$_} + 1; Use this instead: $hash{$_} ++; -- Just my 0.0002 million dollars worth, Shawn Confusion is the first step of understanding. Programmin

WMI

2011-04-16 Thread Mike Flannigan
I used to run this script and it worked fine. Now is gives error Can't locate WMI.pm in @INC . . . Sure enough the module is gone and I can't find it in ActiveState ppm. Anybody know what happened to this module? I Googled and couldn't find the answer.

Re: move array elements to hash

2011-04-16 Thread Shawn H Corey
On 11-04-14 03:29 PM, mark baumeister wrote: #create key - value pairs to go into a hash by first entering each into a list @k or @v print "input key/value pairs: first a key then return, then a value then return, etc. To stop entering key/value pairs type 'stop'\n"; while ($kv =) { chomp($kv

Re: hash troubles

2011-04-16 Thread Octavian Rasnita
From: "dbro" > Im trying to learn hashes but having a hard time trying to figure out > why it seems I cant use data from a hash outside of the original for > loop. This code works as expected to me. I guess it would be the > same if i just stuck a print statement after the hash assignment: > >

Re: help in scripting

2011-04-16 Thread Uri Guttman
> "AG" == Agnello George writes: AG> On Sat, Apr 16, 2011 at 2:36 PM, Uri Guttman wrote: >> >>  AG> open(INPUT_FILE, $filename)  or die "cannot opnen file $!"; >> >> don't use bareword filehandles. this is said all the time here. use >> lexical handles. >> AG> Could you G

Re: help in scripting

2011-04-16 Thread Agnello George
On Sat, Apr 16, 2011 at 2:36 PM, Uri Guttman wrote: > >  AG> open(INPUT_FILE, $filename)  or die "cannot opnen file $!"; > > don't use bareword filehandles. this is said all the time here. use > lexical handles. > Could you Give me a example for lexical handles or reference me to a website . Th

Re: help in scripting

2011-04-16 Thread Uri Guttman
> "AG" == Agnello George writes: AG> use strict; AG> my $filename = $ARGV[0]; AG> my (%tag,$dkey,$dval); you don't use $dkey or $dval anywhere. AG> open(INPUT_FILE, $filename) or die "cannot opnen file $!"; don't use bareword filehandles. this is said all the time here. use lexi

Re: help in scripting

2011-04-16 Thread Agnello George
On Sat, Apr 16, 2011 at 11:36 AM, Gurunath Katagi wrote: > hi .. i am new to perl .. > i have a input file something pasted as below .. > > 16 50 > 16 30 > 16 23 > 17 88 > 17 99 > 18 89 > 18 1 > .. > -- > > and i want the output something like this : > 16 50 30 23 > 17 88 99 > 18 99 1 > > i.e for

hash troubles

2011-04-16 Thread dbro
Im trying to learn hashes but having a hard time trying to figure out why it seems I cant use data from a hash outside of the original for loop. This code works as expected to me. I guess it would be the same if i just stuck a print statement after the hash assignment: #!/usr/bin/perl -w use st

move array elements to hash

2011-04-16 Thread mark baumeister
Hi, I am trying to move array elements (populated from the ) into a hash as pairs [i] and [i + 1] and then print them out using the code below. If I enter "bob" as the first element and hit enter I get the error messages below. I guess there are multiple problems with my code. For one it appears th

Padre IDE

2011-04-16 Thread mark baumeister
Hi, I'm trying to use the Padre IDE for perl. >From what I have read I guess it is not really a bonified IDE. However, I have read that one can at least use it to debug your code. It also has a feature to run your scripts. I have tried both of this functions with little success. If I have my .p

Re: help in scripting

2011-04-16 Thread Uri Guttman
> "IG" == Ishwor Gurung writes: IG> [isg@tarzan:perl]# cat -n foo.pl don't post code with line numbers. then it can't be cut/pasted by others. IG> 1#!/usr/bin/env perl IG> 2use warnings; IG> 3use strict; IG> 4use Data::Dumper; IG> 5o

Re: help in scripting

2011-04-16 Thread Ishwor Gurung
Hi. On 16 April 2011 16:06, Gurunath Katagi wrote: > hi .. i am new to perl .. > i have a input file something pasted as below .. > > 16 50 > 16 30 > 16 23 > 17 88 > 17 99 > 18 89 > 18 1 > .. > -- > > and i want the output something like this : > 16 50 30 23 > 17 88 99 > 18 99 1 > > i.e for each