Re: Perl script doesnt behave well

2008-07-15 Thread luke devon
Hi Rob Thank you for all valuable informations. I tried all the steps you mentioned in the mail. All were success except only following lines. my $sth = $dbh-prepare($query) or die $dbh-errstr; $sth-execute($ip) or die $dbh-errstr; if i add those lines in to the code , squid redirector

Re: PDF::API2, error Can't call method val.... when adding a picture to the PDF

2008-07-15 Thread Dermot
2008/7/14 ChrisC [EMAIL PROTECTED]: I am not sure what is going on. It works, then it does not? Is there a solution for this? I have been able to find little to NO doc on this. use strict; . . . sub picture { my $picture = shift; my $xp = shift; my $yp = shift;

Re: One step substitution

2008-07-15 Thread Dermot
2008/7/14 Brad Baxter [EMAIL PROTECTED]: Dermot wrote: Hi, I am trying to build a hash(ref) and while doing so I want to remove any white space from strings such as 1280 x 1024. So I have my $record = { contributor = $resolution, }; Perhaps I am trying to be too clever

Re: Embedding Perl in C: Replacing some subroutine in Perl from C

2008-07-15 Thread Ivan Gromov
Rob Dixon wrote: print() is one of the built-in functions that can't be overridden. You will have to use a source filter or simply edit your Perl program. Take a look at perldoc perlfilter for guidance on the former option. By the way, you have an argument count of 3 in your call to

Compare Excel file

2008-07-15 Thread Sivasakthi
Hi all, Is it possible to compare two excel file by using Perl? Thanks, Siva -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Compare Excel file

2008-07-15 Thread Gunnar Hjalmarsson
Sivasakthi wrote: Is it possible to compare two excel file by using Perl? Yes. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Compare Excel file

2008-07-15 Thread Sivasakthi
Gunnar Hjalmarsson wrote: Sivasakthi wrote: Is it possible to compare two excel file by using Perl? Yes. Let me know how to do that.. or direct me to right document. Thanks.. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Compare Excel file

2008-07-15 Thread Sivasakthi
Gunnar Hjalmarsson wrote: Sivasakthi wrote: Is it possible to compare two excel file by using Perl? Yes. How can we do that? .. or direct me to right document. Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: rename files in directory - help

2008-07-15 Thread jet speed
On 7/14/08, Rob Dixon [EMAIL PROTECTED] wrote: jet speed wrote: I put togather few lines of code, I am looking to achieve the below dir1 with file1, file2 dir2 with file1, file2 i want to copy the files from each of the directory to a third directory dir3 as file1, file2 from

RE: Compare Excel file

2008-07-15 Thread Thomas Bätzler
Sivasakthi [EMAIL PROTECTED] asked: Gunnar Hjalmarsson wrote: Sivasakthi wrote: Is it possible to compare two excel file by using Perl? Yes. How can we do that? .. or direct me to right document. Use Spreadsheet::ParseExcel

Re: Compare Excel file

2008-07-15 Thread Gunnar Hjalmarsson
Sivasakthi wrote: Gunnar Hjalmarsson wrote: Sivasakthi wrote: Is it possible to compare two excel file by using Perl? Yes. Let me know how to do that.. or direct me to right document. I have never done it, but I think I'd follow these steps: 1. Decide in what way they are going to be

Re: Compare Excel file

2008-07-15 Thread Amit Saxena
What about this approach where we convert two excel files in .csv format and then compare those two files ? Regards, Amit Saxena On Tue, Jul 15, 2008 at 4:33 PM, Gunnar Hjalmarsson [EMAIL PROTECTED] wrote: Sivasakthi wrote: Gunnar Hjalmarsson wrote: Sivasakthi wrote: Is it possible to

Re: possible to compare two excel file by using Perl?

2008-07-15 Thread Gunnar Hjalmarsson
ramkumar wrote (to me privately): Pls send perl code to my id for xl fils comparision using perl. How much would you pay me? Because you didn't mean for free, did you? -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: Compare Excel file

2008-07-15 Thread Gunnar Hjalmarsson
[ Top-posted message from Amit Saxena disregarded. ] -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

RE: possible to compare two excel file by using Perl?

2008-07-15 Thread Stewart Anderson
I hope you have sent a complete working program. That is what the list is for after all, isn't it ? -Original Message- From: Gunnar Hjalmarsson [mailto:[EMAIL PROTECTED] Sent: 15 July 2008 12:20 To: beginners@perl.org; ramkumar Subject: Re: possible to compare two excel file by

Re: combo boxes + Perl

2008-07-15 Thread elavazhagan perl
Hi Rob... Thanks man...Like babbling ,I have coded for my requirementPlease have a glance on the portion of my code . Now almost I got the solution...trying to optimize it... *Note: *The value of $ country_code is obtained by the following line * my $country_code =

Re: Embedding Perl in C: Replacing some subroutine in Perl from C

2008-07-15 Thread Rob Dixon
Ivan Gromov wrote: Rob Dixon wrote: print() is one of the built-in functions that can't be overridden. You will have to use a source filter or simply edit your Perl program. Take a look at perldoc perlfilter for guidance on the former option. By the way, you have an argument count

Re: Re: how to read the formatted data from the file?

2008-07-15 Thread bin . lv
In fact, sscanf belongs to the String::Scanf, when I install this module,program works ok. thank you all the same! 2008/7/14 Amit Saxena [EMAIL PROTECTED]: You need not to call any specific module for sscanf. Could you tell me the line number where perl complains ? Also please post your

Re: Get Clients Windows Logon ID

2008-07-15 Thread leolim818
On Jul 15, 11:11 am, [EMAIL PROTECTED] (Rob Dixon) wrote: [EMAIL PROTECTED] wrote: On Jul 15, 12:32 am, [EMAIL PROTECTED] (Rob Dixon) wrote: How is this Perl programming being run? It looks like it's a CGI program or being run from a scheduler, in which case the process doesn't belong to

Re: Get Clients Windows Logon ID

2008-07-15 Thread leolim818
On Jul 15, 11:11 am, [EMAIL PROTECTED] (Rob Dixon) wrote: [EMAIL PROTECTED] wrote: On Jul 15, 12:32 am, [EMAIL PROTECTED] (Rob Dixon) wrote: How is this Perl programming being run? It looks like it's a CGI program or being run from a scheduler, in which case the process doesn't belong to

template loop problem

2008-07-15 Thread Graeme McLaren
Hi all, I'm tryin to do something simple. The output I want needs to be in a table, for example: table tr tdEuros/tdtddollars/td /tr trtdeuro value/tdtddollar value/td /tr /table In my code I have: $html-param(LOOP = [

Re: Get Clients Windows Logon ID

2008-07-15 Thread Mimi Cafe
remote_user() or user_name() should give you the name of the user if you are using CGI.pm. Mimi On 15/07/2008, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Jul 15, 11:11 am, [EMAIL PROTECTED] (Rob Dixon) wrote: [EMAIL PROTECTED] wrote: On Jul 15, 12:32 am, [EMAIL PROTECTED] (Rob

Re: Embedding Perl in C: Replacing some subroutine in Perl from C

2008-07-15 Thread Paul Johnson
On Tue, Jul 15, 2008 at 01:49:42PM +0100, Rob Dixon wrote: Ivan Gromov wrote: Rob Dixon wrote: print() is one of the built-in functions that can't be overridden. You will have to use a source filter or simply edit your Perl program. Take a look You can do something horrible in XS

Re: template loop problem

2008-07-15 Thread Rob Dixon
Graeme McLaren wrote: Hi all, I'm tryin to do something simple. The output I want needs to be in a table, for example: table tr tdEuros/tdtddollars/td /tr trtdeuro value/tdtddollar value/td /tr /table In my code I have:

Re: Get Clients Windows Logon ID

2008-07-15 Thread Rob Dixon
[EMAIL PROTECTED] wrote: On Jul 15, 11:11 am, [EMAIL PROTECTED] (Rob Dixon) wrote: [EMAIL PROTECTED] wrote: On Jul 15, 12:32 am, [EMAIL PROTECTED] (Rob Dixon) wrote: How is this Perl programming being run? It looks like it's a CGI program or being run from a scheduler, in which case the

RE: template loop problem

2008-07-15 Thread Graeme McLaren
Hi Rob, Basically I want the data displayed in a table, for example (missed out Euros): tabletrtdSterling/tdtdDollars/tdtdEuros/td/trtr tdSterling to Euros/tdtd1.5/tdtdDollars to Sterling/tdtd1.98/tdtdEuros to Sterling/tdtd0.72/td/tr tr tdSterling to

RE: Using a Perl script in AIX / Unix

2008-07-15 Thread Rob McGinness
I always forget the use strict, use warnings. Thanks again. #!/usr/bin/perl use strict; use warnings; my $dir = /cert/ImpactServer-5_4/cl9/ctrl_sfm9/sfm9_sched/; my $dh = .; my @files = do { opendir my $dh, $dir or die Cannot open '$dir' $!; grep

GD::Image

2008-07-15 Thread Nigel Peck
Can someone please let me have some example code of setting the colour of text being added to an image, my current code is: my $image = GD::Image-new( $data_path . '/voucher/voucher.jpg' ); # Write the date $image-string( gdGiantFont, 315, 198, $expiry_date , 0 ); # Write the voucher number

Re: Using a Perl script in AIX / Unix

2008-07-15 Thread Rob Dixon
Rob McGinness wrote: I always forget the use strict, use warnings. Thanks again. #!/usr/bin/perl use strict; use warnings; my $dir = /cert/ImpactServer-5_4/cl9/ctrl_sfm9/sfm9_sched/; my $dh = .; Now you have a different spare line :) my @files = do { opendir my $dh, $dir or

Re: GD::Image

2008-07-15 Thread Rob Dixon
Nigel Peck wrote: Can someone please let me have some example code of setting the colour of text being added to an image, my current code is: my $image = GD::Image-new( $data_path . '/voucher/voucher.jpg' ); # Write the date $image-string( gdGiantFont, 315, 198, $expiry_date , 0 ); #

Re: template loop problem

2008-07-15 Thread Rob Dixon
Graeme McLaren wrote: Hi Rob, Basically I want the data displayed in a table, for example (missed out Euros): table tr tdSterling/td tdDollars/td tdEuros/td /tr tr tdSterling to Euros/td td1.5/td tdDollars to Sterling/td

what is wrong w/ this program? (getting undefined value.. but I don't understand) please help

2008-07-15 Thread Richard Lee
what is wrong w/ below program??? use warnings; use strict; use diagnostics; #open 'PASSWD', '', '/etc/passwd' or die cannot open: $!\n; open (PASSWD1, /etc/passwd) or die cannot open: $!\n; my $line; while ( chomp($line = PASSWD1) ) { print ---$line---\n if $line =~ /root/; }

Re: what is wrong w/ this program? (getting undefined value.. but I don't understand) please help

2008-07-15 Thread Richard Lee
Richard Lee wrote: what is wrong w/ below program??? use warnings; use strict; use diagnostics; #open 'PASSWD', '', '/etc/passwd' or die cannot open: $!\n; open (PASSWD1, /etc/passwd) or die cannot open: $!\n; my $line; while ( chomp($line = PASSWD1) ) { print ---$line---\n if $line

Re: what is wrong w/ this program? (getting undefined value.. but I don't understand) please help

2008-07-15 Thread John W. Krahn
Richard Lee wrote: what is wrong w/ below program??? use warnings; use strict; use diagnostics; #open 'PASSWD', '', '/etc/passwd' or die cannot open: $!\n; open (PASSWD1, /etc/passwd) or die cannot open: $!\n; my $line; while ( chomp($line = PASSWD1) ) { The problem is that you are using

Re: what is wrong w/ this program? (getting undefined value.. but I don't understand) please help

2008-07-15 Thread Richard Lee
John W. Krahn wrote: Or you could do it like this: #!/usr/bin/perl use warnings; use strict; use diagnostics; print '---', join( ':', getpwnam 'root' ), ---\n, join( ':', getpwnam 'ellie' ), \n; __END__ John Thank you for through explanation John as always!! -- To unsubscribe, e-mail:

pack and fcntl question

2008-07-15 Thread Masanari Iida
Hello List, I am new to perl. I run following sample script, and see strace output. I have 2 questions. === #!/usr/bin/perl use Fcntl qw/:DEFAULT :flock :seek F_GETFL/; sysopen( LOCK_FILE, ./sample.txt, O_WRONLY | O_CREAT); $PackedPattern = ss; $LockInfo = pack( $PackedPattern,