Re: Perl script doesnt behave well

2008-07-14 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 do

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

2008-07-14 Thread Amit Saxena
oops I was thinking along "C" lines on that one ! Please remove sscanf part from the loop. Regards Amit Saxena On Tue, Jul 15, 2008 at 2:29 AM, Rob Dixon <[EMAIL PROTECTED]> wrote: > > Brad Baxter wrote: > > Amit Saxena wrote: > >> #! /usr/bin/perl > >> > >> use warnings; > >> use strict; > >>

Re: Get Clients Windows Logon ID

2008-07-14 Thread Rob Dixon
[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 any >> individual user. >> >> What are you trying to a

Re: Passing Variables to Perl through HTTP

2008-07-14 Thread Wolf
Wei, Alice J. wrote: Hi, About the three param's that I am using in my code, all of these are meant to be passed on using GET. My problem is that I am not sure if the reason why http://192.168.10.63/file_linux.php?id=123 prints out something like: Cannot create directory Cannot create direc

Re: Passing Variables to Perl through HTTP

2008-07-14 Thread Gunnar Hjalmarsson
[ Please do not top-post!! ] Wei, Alice J. wrote: About the three param's that I am using in my code, all of these are meant to be passed on using GET. My problem is that I am not sure if the reason why http://192.168.10.63/file_linux.php?id=123 prints out something like: Cannot create directo

RE: Passing Variables to Perl through HTTP

2008-07-14 Thread Wei, Alice J.
Hi, About the three param's that I am using in my code, all of these are meant to be passed on using GET. My problem is that I am not sure if the reason why http://192.168.10.63/file_linux.php?id=123 prints out something like: Cannot create directory Cannot create directory Cannot create dire

Re: Passing Variables to Perl through HTTP

2008-07-14 Thread Gunnar Hjalmarsson
Wei, Alice J. wrote: This may be a very dumb question, but I am having the problem of putting the variables on the url through Perl to get it to execute the following mkdir command. #!/usr/bin/perl -w use CGI qw(:standard -debug); use CGI::Carp qw(fatalsToBrowser); print "Content-type: text/

Re: Get Clients Windows Logon ID

2008-07-14 Thread leolim818
On Jul 15, 12:32 am, [EMAIL PROTECTED] (Rob Dixon) wrote: > [EMAIL PROTECTED] wrote: > > On Jul 11, 11:59 pm, [EMAIL PROTECTED] (Rob Dixon) wrote: > >> Amit Saxena wrote: > > >>> On Fri, Jul 11, 2008 at 8:39 PM, Rob Dixon <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Can you pl

Passing Variables to Perl through HTTP

2008-07-14 Thread Wei, Alice J.
Hi, Guys: This may be a very dumb question, but I am having the problem of putting the variables on the url through Perl to get it to execute the following mkdir command. #!/usr/bin/perl -w use CGI qw(:standard -debug); use CGI::Carp qw(fatalsToBrowser); print "Content-type: text/html\n\n"

Re: Using a Perl script in AIX / Unix

2008-07-14 Thread Rob Dixon
Rob McGinness wrote: > > Thanks Rob Dixon and John W. Krahn for your help I really appreciate > it. This is what I came up with based on your examples and the code > works great. Thanks again. > > > #!/usr/bin/perl Always use strict; use warnings; at the start of your program. That way

Re: gmail

2008-07-14 Thread yitzle
On Mon, Jul 14, 2008 at 2:36 PM, ChrisC <[EMAIL PROTECTED]> wrote: > Is it possible to access gmail from perl? If so, how would you go > about it? > > Thanks, > > Jerry You might want to start by searching CPAN for Gmail modules: http://search.cpan.org/search?query=gmail&mode=module -- To unsub

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

2008-07-14 Thread ChrisC
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; my $sp = shift; $photo->image

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

2008-07-14 Thread Rob Dixon
Brad Baxter wrote: > Amit Saxena wrote: >> #! /usr/bin/perl >> >> use warnings; >> use strict; >> >> open (PTR1, "> $!\n\n"; >> >> while (chomp ($str = )) >> { >> sscanf($str, "%5d %11.2f", $data1, $data2); >> >> # do whatever processing. >> } >> >> close (PTR1); >> >> Regards, >>

RE: Using a Perl script in AIX / Unix

2008-07-14 Thread Rob McGinness
Thanks Rob Dixon and John W. Krahn for your help I really appreciate it. This is what I came up with based on your examples and the code works great. Thanks again. Rob McGinness #!/usr/bin/perl my $dir = "/cert/ImpactServer-5_4/cl9/ctrl_sfm9/sfm9_sched/archives/"; my $dh = opendir DIR

Re: [OT] PC-Soft morons again

2008-07-14 Thread Dr.Ruud
Gunnar Hjalmarsson schreef: > Dr.Ruud: >> Let's try to get these polluters expelled from The Internet: > > How? Heheh, was a joke, there is no such thing as "expelled from The Internet". (though my daughter might disagree) > The list member [EMAIL PROTECTED], who makes use of their 'service' fo

Re: constant in regular expression

2008-07-14 Thread Brad Baxter
William wrote: Hello, what is the syntax for having constant in regular expression ? Such as use constant (NL => '\n'); #check if there is newline in the text my $txt = "foo \n bar"; if($txt =~ m/ # ??? /x) { } Constants cannot be interpolated into strings like variables. This applies to in

Re: One step substitution

2008-07-14 Thread Brad Baxter
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 but I thought I could do my $record = {

gmail

2008-07-14 Thread ChrisC
Is it possible to access gmail from perl? If so, how would you go about it? Thanks, Jerry -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

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

2008-07-14 Thread Brad Baxter
Amit Saxena wrote: #! /usr/bin/perl use warnings; use strict; open (PTR1, ")) { sscanf($str, "%5d %11.2f", $data1, $data2); # do whatever processing. } close (PTR1); Regards, Amit Saxena sscanf()? -- Brad -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comma

Re: constant in regular expression

2008-07-14 Thread Rob Dixon
William wrote: > Hello, what is the syntax for having constant in regular expression ? Such as > > use constant (NL => '\n'); You know this will create NL as a two-character string - backslash and 'N' - right? You need double quotes if you want the "\n" control character. > #check if there is n

constant in regular expression

2008-07-14 Thread William
Hello, what is the syntax for having constant in regular expression ? Such as use constant (NL => '\n'); #check if there is newline in the text my $txt = "foo \n bar"; if($txt =~ m/ # ??? /x) { } Thanks. Send instant messages to your online friends http://uk.messenger.yahoo.com -- To unsubs

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

2008-07-14 Thread Rob Dixon
Rob Dixon wrote: > > Amit Saxena wrote: >> >> while (chomp ($str = )) > > That will exit the loop if an empty line is encountered before the end of the > file, and will throw a warning at the end of the file because of chomp having > an > uninitialized value My apologies; chomp returns the numb

Re: One step substitution

2008-07-14 Thread Dermot
2008/7/14 Rob Dixon <[EMAIL PROTECTED]>: > > Dermot wrote: >> >> 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 try

Re: One step substitution

2008-07-14 Thread Rob Dixon
Dermot wrote: > > 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 but I thought I could do > >

Re: rename files in directory - help

2008-07-14 Thread Rob Dixon
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 dir1 and rename the file1 as file3 and file2 as

Re: uninstalling perl

2008-07-14 Thread Francisco Valladolid
Umm, normally each unix/linux system has a beauty procedure for do it. In my NetBSD box i have pkg_delete for this task, some linux maybe have the own utilities. Regards. On Mon, Jul 14, 2008 at 10:02 PM, Rob Dixon <[EMAIL PROTECTED]> wrote: > > Anirban Adhikary wrote: >> Dear list >> >> If I

One step substitution

2008-07-14 Thread Dermot
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 but I thought I could do my $record = { contributor =

Re: Perl script doesnt behave well

2008-07-14 Thread Rob Dixon
luke devon wrote: > > I am using perl script to handle some function of squid redirector program . > Actually its working fine. But after some time , that functions goes off. > That's meant VALUE-A doesnt comes in to the request. > > I checked the DB , it also fine. > CPU also nothing > > Can s

Re: uninstalling perl

2008-07-14 Thread Rob Dixon
Anirban Adhikary wrote: > Dear list > > If I want to remove perl from my linux/unix machine then what is the > procedure for this? Why do you want to remove Perl? It will take only 20MB or less of your disk and it tries hard not to upset anybody. Rob -- To unsubscribe, e-mail: [EMAIL PROTECTE

Re: fetching encrypted passwords for oracle username in Perl !

2008-07-14 Thread Rob Dixon
Amit Saxena wrote: > > Let me explain the scenario in detail. > > My application users Perl-DBI and at present I have encoded my username and > password in the perl program. Now, as my > testing is over, I would like to publish this code to my team so that they > can checkout the latest version

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

2008-07-14 Thread Rob Dixon
Ivan Gromov wrote: > > I have trouble with embedding Perl in C. I would like to replace some > subroutine (exactly it is print function) in Perl script without > changing this script. > > #include > #include > > static PerlInterpreter *my_perl; // Perl interpreter in my program > > int main(

Re: combo boxes + Perl

2008-07-14 Thread Rob Dixon
elavazhagan perl wrote: > > I have two combo boxes in which the first one is used for choosing the > Regions and the second one is for the corresponding countries. > I would like to do this with Perl and html without importation any modules > and eventhough it is better by Javascript. > > I am

Re: Perl script doesnt behave well

2008-07-14 Thread John W. Krahn
luke devon wrote: Hi, Hello, I am using perl script to handle some function of squid redirector program . Actually its working fine. But after some time , that functions goes off. That's meant VALUE-A doesnt comes in to the request. I checked the DB , it also fine. CPU also nothing Can s

Re: Get Clients Windows Logon ID

2008-07-14 Thread Rob Dixon
[EMAIL PROTECTED] wrote: > On Jul 11, 11:59 pm, [EMAIL PROTECTED] (Rob Dixon) wrote: >> Amit Saxena wrote: >> >>> On Fri, Jul 11, 2008 at 8:39 PM, Rob Dixon <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote: > Can you please advice me how to get the Clients' windows logon user > name

Re: Define NULL value in Perl

2008-07-14 Thread Jenda Krynicky
From: Rob Dixon <[EMAIL PROTECTED]> > Rob Coops wrote: > > > > *Randal wrote:* > > *Perl doesn't have NULL. That'd be like saying "how do I make this pig > > fly?". > > It's a nonsense question. > > * > > I think this is a little to easy, perl does have a value that indicates that > > a variable d

Re: question about "local our"

2008-07-14 Thread Rob Dixon
Gunnar Hjalmarsson wrote: > > Roman Makurin wrote: >> >> I want to ask whats difference between usage of "local" and "local our" > > http://perl.apache.org/docs/general/perl_reference/perl_reference.html#Remedies_for_Inner_Subroutines But also read this http://www.gossamer-threads.com/lists/m

rename files in directory - help

2008-07-14 Thread jet speed
Hi All, 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 dir1 and rename the file1 as file3 and file2 as file4 from the dir2. dir

Re: Define NULL value in Perl

2008-07-14 Thread Rob Dixon
Rob Coops wrote: > > *Randal wrote:* > *Perl doesn't have NULL. That'd be like saying "how do I make this pig > fly?". > It's a nonsense question. > * > I think this is a little to easy, perl does have a value that indicates that > a variable does not have any set value it is called: undef > In m

Re: Get Clients Windows Logon ID

2008-07-14 Thread leolim818
On Jul 11, 11:59 pm, [EMAIL PROTECTED] (Rob Dixon) wrote: > Amit Saxena wrote: > > > On Fri, Jul 11, 2008 at 8:39 PM, Rob Dixon <[EMAIL PROTECTED]> wrote: > > >> [EMAIL PROTECTED] wrote: > > >>> Can you please advice me how to get the Clients' windows logon user > >>> name in perl? > > >>   $ENV{US

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

2008-07-14 Thread Rob Dixon
Amit Saxena wrote: > > On Mon, Jul 14, 2008 at 8:23 PM, vikingy <[EMAIL PROTECTED]> wrote: > >> There is a file created likes this: >> >> open File ">file.txt" or die $!; >> foreach .. <..> { >> printf File "%5d %11.2f\n", $data1,data2; >> } >> close File; >> >> and my question is,

Re: Handling ignore case and single line in pattern matchin

2008-07-14 Thread Rob Dixon
V.Ramkumar wrote: > > If you don't define input line separator $/=undef; Perl reads line by line > only. No. The default value of $/ is "\n" which makes Perl return one line of text for each read operation. Undefining $/ sets 'slurp' mode which reads all of the file in at once. Rob -- To unsu

Re: using mysql NULL with IF statement

2008-07-14 Thread Huub
if (! defined($myvar)) { The NULL in the database is mapped to an undef. Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz = When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery Thank yo

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

2008-07-14 Thread Amit Saxena
#! /usr/bin/perl use warnings; use strict; open (PTR1, ")) { sscanf($str, "%5d %11.2f", $data1, $data2); # do whatever processing. } close (PTR1); Regards, Amit Saxena On Mon, Jul 14, 2008 at 8:23 PM, vikingy <[EMAIL PROTECTED]> wrote: > Hi all, > > There is a file created l

how to read the formatted data from the file?

2008-07-14 Thread vikingy
Hi all, There is a file created likes this: open File ">file.txt" or die $!; foreach .. <..> { printf File "%5d %11.2f\n", $data1,data2; } close File; and my question is, how to read these data follow the same format as "%5d %11.2f' from this file again? thanks in advance

Re: Define NULL value in Perl

2008-07-14 Thread Randal L. Schwartz
> "Rob" == Rob Coops <[EMAIL PROTECTED]> writes: Rob> I thik the thing that Randal was saying is that 'NULL' does not exist as a Rob> value in perl but he left out the part that others have pointed out before Rob> 'undef' has the same significance in perl as 'NULL' in other languages. But it

Re: Perl script doesnt behave well

2008-07-14 Thread Amit Saxena
modifiy $sth->execute(); with $num_rows = $sth->execute() or die "Unable to call execute $!\n\n"; Regards, Amit Saxena On Mon, Jul 14, 2008 at 6:30 PM, luke devon <[EMAIL PROTECTED]> wrote: > could you please direct me how could I implement those steps in to the code > ? > > > > - Origina

Re: Perl script doesnt behave well

2008-07-14 Thread luke devon
could you please direct me how could I implement those steps in to the code ? - Original Message From: Thomas Bätzler <[EMAIL PROTECTED]> To: Perl Cc: luke devon <[EMAIL PROTECTED]> Sent: Monday, July 14, 2008 16:05:21 Subject: RE: Perl script doesnt behave well luke devon <[EMAIL PRO

Re: Define NULL value in Perl

2008-07-14 Thread Rob Coops
*Randal wrote:* *Perl doesn't have NULL. That'd be like saying "how do I make this pig fly?". It's a nonsense question. * I think this is a little to easy, perl does have a value that indicates that a variable does not have any set value it is called: undef In many other langueages like Java, Vis

Re: Perl script doesnt behave well

2008-07-14 Thread Amit Saxena
Try pasting some input record for which the output is not coming. If the record contains confidential data, you can mask the data. Regards, Amit Saxena On Mon, Jul 14, 2008 at 3:43 PM, luke devon <[EMAIL PROTECTED]> wrote: > Hi, > > I am using perl script to handle some function of squid redire

RE: Perl script doesnt behave well

2008-07-14 Thread Thomas Bätzler
luke devon <[EMAIL PROTECTED]> asked: > I am using perl script to handle some function of squid > redirector program . Actually its working fine. But after > some time , that functions goes off. That's meant VALUE-A > doesnt comes in to the request. Is it possible that your script has lost the

Re: uninstalling perl

2008-07-14 Thread Peter Scott
On Mon, 14 Jul 2008 15:02:36 +0530, Anirban Adhikary wrote: > No the version of perl currently installed in my system has been shipped > with the operating system. Then you should ask your operating system vendor how to uninstall perl, or whether this is even feasible. Particularly since they ma

Perl script doesnt behave well

2008-07-14 Thread luke devon
Hi, I am using perl script to handle some function of squid redirector program . Actually its working fine. But after some time , that functions goes off. That's meant VALUE-A doesnt comes in to the request. I checked the DB , it also fine. CPU also nothing Can some body help me please ?

Re: Debug Help Please

2008-07-14 Thread Peter Scott
On Mon, 07 Jul 2008 05:16:10 -0700, Andy wrote: > One of the Perl guys at my office. told me that I can use > use strict; > use warnings; > > but he said , he really doesn't because he wants the script to do what > it needs to do... And if one of "the car guys" at your office announced that he'd

Re: uninstalling perl

2008-07-14 Thread Anirban Adhikary
My os is kernel version is 2.6.9-67.0.15.ELlargesmp OS is GNU/Linux perl version is 5.8.5 On Mon, Jul 14, 2008 at 3:05 PM, Amit Saxena <[EMAIL PROTECTED]> wrote: > Which OS you are using and what's the version of Perl ? > > > On Mon, Jul 14, 2008 at 3:02 PM, Anirban Adhikary < > [EMAIL PROTECTED]

Re: fetching encrypted passwords for oracle username in Perl !

2008-07-14 Thread Amit Saxena
No Jeff, that's not what I am looking for. Let me explain the scenario in detail. My application users Perl-DBI and at present I have encoded my username and password in the perl program. Now, as my testing is over, I would like to publish this code to my team so that they can checkout the latest

Re: uninstalling perl

2008-07-14 Thread Anirban Adhikary
No the version of perl currently installed in my system has been shipped with the operating system. On Mon, Jul 14, 2008 at 3:01 PM, Amit Saxena <[EMAIL PROTECTED]> wrote: > If it's installed through rpm, you can use rpm -e perlmodulename to install > it. > > Regards, > Amit Saxena > > > On Mon

Re: fetching encrypted passwords for oracle username in Perl !

2008-07-14 Thread Jeff Peng
On Mon, Jul 14, 2008 at 4:40 PM, Amit Saxena <[EMAIL PROTECTED]> wrote: > Hi > > Instead of hard-coded passwords in my source code or an input file, I would > like to enable some sort of encryption through some keys for all the > usernames in Oracle 10g. > > Please let me know how to do that with P

Re: uninstalling perl

2008-07-14 Thread Jeff Peng
On Mon, Jul 14, 2008 at 5:12 PM, Anirban Adhikary <[EMAIL PROTECTED]> wrote: > Dear list > > If I want to remove perl from my linux/unix machine then what is the > procedure for this? > Why do it? Without Perl many system functions can't run. -- Regards, Jeff. - [EMAIL PROTECTED] -- To unsubsc

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

2008-07-14 Thread Ivan Gromov
Dear All, I have trouble with embedding Perl in C. I would like to replace some subroutine (exactly it is print function) in Perl script without changing this script. #include #include static PerlInterpreter *my_perl; // Perl interpreter in my program int main(int argc, char **argv) { char*

uninstalling perl

2008-07-14 Thread Anirban Adhikary
Dear list If I want to remove perl from my linux/unix machine then what is the procedure for this? Thanks & Regards in advance Anirban Adhikary.

fetching encrypted passwords for oracle username in Perl !

2008-07-14 Thread Amit Saxena
Hi Instead of hard-coded passwords in my source code or an input file, I would like to enable some sort of encryption through some keys for all the usernames in Oracle 10g. Please let me know how to do that with Perl DBI ? Thanks & Regards, Amit Saxena

combo boxes + Perl

2008-07-14 Thread elavazhagan perl
HI... I have two combo boxes in which the first one is used for choosing the Regions and the second one is for the corresponding countries. I would like to do this with Perl and html without importation any modules and eventhough it is better by Javascript. I am getting the pull down menu value

Re: question about "local our"

2008-07-14 Thread Gunnar Hjalmarsson
Roman Makurin wrote: I want to ask whats difference between usage of "local" and "local our" http://perl.apache.org/docs/general/perl_reference/perl_reference.html#Remedies_for_Inner_Subroutines -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [E