Re: problem with passing variables

2011-12-30 Thread Shlomi Fish
Hi Mark, On Fri, 30 Dec 2011 14:19:04 -0500 Mark Haney wrote: > On 12/30/2011 12:50 PM, Igor Dovgiy wrote: > > If you pass into SQL query something assigned by user, use > > placeholders by all means. ) It's not that hard, but it'll save you a > > lot of headaches, believe me. ) > > > > 2011/1

Re: problem with passing variables

2011-12-30 Thread Mark Haney
On 12/30/2011 12:50 PM, Igor Dovgiy wrote: If you pass into SQL query something assigned by user, use placeholders by all means. ) It's not that hard, but it'll save you a lot of headaches, believe me. ) 2011/12/30 Mark Haney mailto:ma...@abemblem.com>> But there's another (and in my opi

Re: problem with passing variables

2011-12-30 Thread Igor Dovgiy
If you pass into SQL query something assigned by user, use placeholders by all means. ) It's not that hard, but it'll save you a lot of headaches, believe me. ) 2011/12/30 Mark Haney > But there's another (and in my opinion, usually better) way: using > prepared sql statement: > my $sth = $dbh->

Re: problem with passing variables

2011-12-30 Thread Shlomi Fish
Hi Mark, On Fri, 30 Dec 2011 12:39:04 -0500 Mark Haney wrote: > On 12/30/2011 12:30 PM, Igor Dovgiy wrote: > > Hi Mark, > > > > If your variables are strictly internal and by no means might be ever > > tainted (read: user input), what you're doing is mostly ok. > > But you need to quote the dat

Re: problem with passing variables

2011-12-30 Thread Mark Haney
On 12/30/2011 12:30 PM, Igor Dovgiy wrote: Hi Mark, If your variables are strictly internal and by no means might be ever tainted (read: user input), what you're doing is mostly ok. But you need to quote the dates passed within query itself, like this: my $sql = qq/SELECT * FROM `events` WHER

Re: problem with passing variables

2011-12-30 Thread Shlomi Fish
On Fri, 30 Dec 2011 12:08:50 -0500 Mark Haney wrote: > I'm not sure if this is the right list for this, so bear with me. If it > isn't I'll be glad to post it on the correct one. > > I've got a problem with passing variables to a SQL server inside a CGI

Re: problem with passing variables

2011-12-30 Thread Igor Dovgiy
the right list for this, so bear with me. If it > isn't I'll be glad to post it on the correct one. > > I've got a problem with passing variables to a SQL server inside a CGI > script. My code is like this: > > my $begin_time = "2011-11-16 11:00:00"; >

problem with passing variables

2011-12-30 Thread Mark Haney
I'm not sure if this is the right list for this, so bear with me. If it isn't I'll be glad to post it on the correct one. I've got a problem with passing variables to a SQL server inside a CGI script. My code is like this: my $begin_time = "2011-11-16 11:00:00&quo

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.
Alice -Original Message- From: Gunnar Hjalmarsson [mailto:[EMAIL PROTECTED] Sent: Monday, July 14, 2008 9:49 PM To: beginners@perl.org Subject: Re: Passing Variables to Perl through HTTP Wei, Alice J. wrote: > This may be a very dumb question, but I am having the problem of >

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/

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: Passing variables to subroutine

2007-09-03 Thread Jeff Pang
2007/9/3, sivasakthi <[EMAIL PROTECTED]>: > Hi All, > > I have tested the following script for reading the log files and write > in to the file, > > > #!/usr/bin/perl > use strict; > use warnings; > use File::Tail; > my $file=File::Tail->new("/log/path"); > while (defined(my $line=$file->read)) > {

Passing variables to subroutine

2007-09-03 Thread sivasakthi
Hi All, I have tested the following script for reading the log files and write in to the file, #!/usr/bin/perl use strict; use warnings; use File::Tail; my $file=File::Tail->new("/log/path"); while (defined(my $line=$file->read)) { my ($time,$lport,$ip,$stats,$rport)=split" ",$line; &writedata;

Re: passing variables from perl to the system

2005-08-18 Thread Jeff 'japhy' Pinyan
On Aug 18, Eliyah Kilada said: Do anyone know how to pass the perl variables to the system in order to be used later?! A process cannot modify its parent's environment. You can set environment variables to be used during the Perl program that are visible to the Perl program's child processe

Re: passing variables from perl to the system

2005-08-18 Thread Xavier Noria
On Aug 18, 2005, at 13:38, Eliyah Kilada wrote: Do anyone know how to pass the perl variables to the system in order to be used later?! Perl offers built-in support for environment variables via the %ENV hash: % cat foo.pl $ENV{FOO} = "foo"; system q(echo $FOO); % perl foo

passing variables from perl to the system

2005-08-18 Thread Eliyah Kilada
Hi, Do anyone know how to pass the perl variables to the system in order to be used later?! I though of passing them as enviromental variables using system (export, "sys_var_name","= $perl_var_name" ); but it doesn't work -:( Any help is highly appreciated! Best Regards, Eliyah -- To uns

Re: passing variables

2005-05-18 Thread JupiterHost.Net
DiGregorio, Dave wrote: Is there a way to pass variables from a perl script to know when it ends to VB? Same way you pass a kidney stone ;) Sorry I couldn't resist ;p Seriously though what have you tried? how is Perl communicating with VB? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additiona

passing variables

2005-05-18 Thread DiGregorio, Dave
Is there a way to pass variables from a perl script to know when it ends to VB? David R. DiGregorio Vocollect 703 Rodi Road Pittsburgh, PA 15235 P. 412-349-2440 [EMAIL PROTECTED] -CONFIDENTIAL, PRIVILEGED COMMUNICATION- This e-mail transmission is privat

Re: passing variables into mysql

2003-03-31 Thread R. Joseph Newton
Jasmine wrote: > Hi > > Is there any way to pass variables into MySQL statements for execution? I m > using the DBI package. Thanks! I think the problem has more to do with the join function > Heres my snippet and it doesnt work. > dbconnect(); > prepare the query

Re: passing variables into mysql

2003-03-31 Thread Joe Mecklin
here's one i wrote a while back; it builds the arguments dynamically depending on what parameters cgi passes back from the page to the script. the biggest problem probably is to make sure you have all the quotes accounted for. the variables being passed here are only the "where" clauses but the s

passing variables into mysql -> part2

2003-03-31 Thread Jasmine
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thanks for the reply but Hmm.. have tried that but still wont work. On Tuesday 01 April 2003 02:13, you wrote: > Hi - > > On 1 Apr 2003 at 1:20, Jasmine wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > > > Hi > > > > Is there any

Re: passing variables into mysql

2003-03-31 Thread beau
Hi - On 1 Apr 2003 at 1:20, Jasmine wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > Hi > > Is there any way to pass variables into MySQL statements for execution? I m > using the DBI package. Thanks! > > Heres my snippet and it doesnt work. > dbconnect(); >

passing variables into mysql

2003-03-31 Thread Jasmine
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Is there any way to pass variables into MySQL statements for execution? I m using the DBI package. Thanks! Heres my snippet and it doesnt work. dbconnect(); prepare the query for execution my ($sq

LWP passing variables in get method

2003-03-30 Thread Ramprasad
How do I pass variables to a form using LWP in the GET Method. If my url is http://192.168.2.25/adminbin/getdetails and I Have to pass two values { user => 'ram prasad' , days => '2' } I am presently creating a querystring $querystring = user=ram+prasad&days=2 and use http://192.168.2.25/adminbin/

Re: LWP passing variables in GET method

2003-03-26 Thread Randal L. Schwartz
> "Ramprasad" == Ramprasad <[EMAIL PROTECTED]> writes: Ramprasad> hello all , Ramprasad> I am trying my script with LWP Ramprasad>suppose in my browser I type in Ramprasad> http://google.com/search?q=sendmail Ramprasad> I get the results all right Ramprasad> but when I try to pass va

RE: LWP passing variables in GET method

2003-03-26 Thread Dan Muey
> hello all , Howdy > > I am trying my script with LWP >suppose in my browser I type in > >http://google.com/search?q=sendmail >I get the results all right >but when I try to pass variables by get method using LWP I get an error > message > > > I have tried allowing cookies too. >

LWP passing variables in GET method

2003-03-26 Thread Ramprasad
hello all , I am trying my script with LWP suppose in my browser I type in http://google.com/search?q=sendmail I get the results all right but when I try to pass variables by get method using LWP I get an error message I have tried allowing cookies too. I am using LWP like this $ua = LW

Re: passing variables in EMAIL

2001-12-26 Thread timothy mccarthy
I always like to use the Mail::Mailer module instead... # use Mail::Mailer; $mailer = Mail::Mailer->new("sendmail"); $mailer->open({ From=> $from_address, To => $to_address, Subject => $subject,

passing variables in EMAIL

2001-12-26 Thread Lance Prais
I am unseeing the following piece of code to send email. In order for this email to be generated there needs to be an error in my script. use Mail::Sendmail;#Send and email if there are errors %mail = ( To => '[EMAIL PROTECTED]', From=> '[EMAIL PROT

Re: Passing variables in Email

2001-12-18 Thread John W. Krahn
Jeff 'Japhy' Pinyan wrote: > > On Dec 18, Lance Prais said: > > >I tried to use '((substr($line, 42, 7)' which the text I want to include but > >it did not show the output. > > You can't put code inside a quoted string and expect it to evaluate. "@{[ substr $line, 42, 7 ]}" :-) John -- use

RE: RE: Passing variables

2001-12-18 Thread Yacketta, Ronald
($hash{$variable_name} ) use $variable_name -Ron > -Original Message- > From: Yacketta, Ronald [mailto:[EMAIL PROTECTED]] > Sent: Friday, December 07, 2001 19:23 > To: [EMAIL PROTECTED] > Subject: RE: RE: Passing variables > > > > > Ron, I think you meant

Re: Passing variables in Email

2001-12-18 Thread Curtis Poe
--- Lance Prais <[EMAIL PROTECTED]> wrote: > I am unseeing the following piece of code to send email. In order for this > email to be generated there needs to be an error in my script. > > use Mail::Sendmail;#Send and email if there are errors > %mail = ( To => '[EM

Re: Passing variables in Email

2001-12-18 Thread Jeff 'japhy' Pinyan
On Dec 18, Lance Prais said: >I tried to use '((substr($line, 42, 7)' which the text I want to include but >it did not show the output. You can't put code inside a quoted string and expect it to evaluate. %mail = ( To => '[EMAIL PROTECTED]', From=> '[EMAIL PROTECTED]',

Passing variables in Email

2001-12-18 Thread Lance Prais
I am unseeing the following piece of code to send email. In order for this email to be generated there needs to be an error in my script. use Mail::Sendmail;#Send and email if there are errors %mail = ( To => '[EMAIL PROTECTED]', From=> '[EMAIL PROT

Re: Passing variables

2001-12-10 Thread William.Ampeh
This may sound too simple but this is the way I would have done it. In the front-end script, initialize the variables $VAR_1=""; $VAR_2=""; Then in the child scripts, you can change these variable $VAR_1="foo1"; $VAR_2="foo2"; If you use strict (what happens?). I have not tried it yet.

RE: RE: Passing variables

2001-12-07 Thread Yacketta, Ronald
you're > heading into administrative territory and > > that's not my strong suit. Someone else on the list is > probably better prepared to answer this. > > > > Cheers, > > Curtis > > > > --- "Yacketta, Ronald" <[EMAIL PROTECTED]&

Fwd: RE: Passing variables

2001-12-07 Thread Curtis Poe
Sent this to the wrong list! Sorry. --- Curtis Poe <[EMAIL PROTECTED]> wrote: > Date: Fri, 7 Dec 2001 15:30:59 -0800 (PST) > From: Curtis Poe <[EMAIL PROTECTED]> > Reply-to: [EMAIL PROTECTED] > Subject: Fwd: RE: Passing variables > To: CGI Beginners <[EMAIL PROT

Re: Passing variables

2001-12-07 Thread Curtis Poe
--- "Yacketta, Ronald" <[EMAIL PROTECTED]> wrote: > Folks, > > I have just completed a front-end enduser script that will take numerous > input values that > need to be passed onto other perl scripts depending on the user input. > > Is there a clean way (other than command line) to pass on the v

Passing variables

2001-12-07 Thread Yacketta, Ronald
Folks, I have just completed a front-end enduser script that will take numerous input values that need to be passed onto other perl scripts depending on the user input. Is there a clean way (other than command line) to pass on the variables from one script to another (the other scripts are calle

Re: passing variables

2001-10-19 Thread Martin
the best way is to bild a modul and include it with use dont forget to export the vars. Take a look on exporter modul hope it helps Martin Natalia Vasilchenko schrieb: > > Hello, all! > > I have some variables defined in file > > > > $user_ip = $ENV{'REMOTE_ADDR'}; > > $user_name = $EN

passing variables

2001-10-19 Thread Natalia Vasilchenko
Hello, all! I have some variables defined in file $user_ip = $ENV{'REMOTE_ADDR'}; $user_name = $ENV{'AUTH_USER'}; . Now I want to use these values in other files. unless ($user_ip =~ /^10\./)... # #etc. What should I do? use 'require userinfo.pl;' or use 'pa

Re: Passing Variables Between Modules...

2001-10-18 Thread Jos I. Boumans
Hi, > How do I get this to work? well, let's try... > package main; > use Simple.pm; if you define the package in the same file, you dont do 'use Simple': perl will then look in @INC for a 'Simple.pm' file, which you dont have. ALSO the syntax is 'use ModuleName' - so no '.pm' at the end! >

Help Learn about passing variables to openssl

2001-09-21 Thread Nael Mohammad
Ok this is my first crack at so someone tell me what im doing wrong? #!/usr/bin/perl -w use CGI qw(:standard); $name = param('name'); $email = param('email'); $cname = param('cname'); $password = param('password'); $expiration = param('expiration'); system ("/export/home/neomar/nael/certs

Re: Passing Variables in Subroutines

2001-04-30 Thread Dan Brown
There's a couple of problems that sound get you started. The first I see is that @_ is an array containing everything that was passed in. So when you did @parms = @_; The values of each element of @parms are as follows $parms[0] # first parameter which was $email $par

Re: Passing Variables in Subroutines

2001-04-30 Thread Johnathan Kupferer
> @parms = @_; > ($user, $user_list, $tag) = split /,/, $parms; Did you mean: my($user, $user_list, $tag) = @_; Try using: use strict; at the top of every script. The problem is that @parms is not $parms. In fact, $parms is undefined, and use strict would point out this error. Yo

Passing Variables in Subroutines

2001-04-30 Thread pbbruce
Hi, I have this small problem of being able to pass routines. send_mail( $email, '',''); sub send_mail { $msg = new Mail::Send; @parms = @_; ($user, $user_list, $tag) = split /,/, $parms; $msg->to($user); print "User is $user\n"; $ans = ; $msg->subject('Password

Re: Passing variables to subroutines

2001-04-28 Thread Dave Watkins
Works like a charm Thanks At 09:57 PM 4/28/01 -0500, you wrote: >-BEGIN PGP SIGNED MESSAGE- >Hash: SHA1 > >On Sun, 29 Apr 2001, Dave Watkins wrote: > > > Hi All > > > > I am trying to pass a variable, a hash table and an array into a subroutine > > like so > > > > subroutine($variable,

Re: Passing variables to subroutines

2001-04-28 Thread Curtis Jewell
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sun, 29 Apr 2001, Dave Watkins wrote: > Hi All > > I am trying to pass a variable, a hash table and an array into a subroutine > like so > > subroutine($variable, %hash, @array); > > and pick it up like so > > sub subroutine { > my($variable

RE: Passing variables to subroutines

2001-04-28 Thread Wagner-David
Saturday, April 28, 2001 19:26 To: [EMAIL PROTECTED] Subject: Passing variables to subroutines Hi All I am trying to pass a variable, a hash table and an array into a subroutine like so subroutine($variable, %hash, @array); and pick it up like so sub subroutine { my($variable, %has

Passing variables to subroutines

2001-04-28 Thread Dave Watkins
Hi All I am trying to pass a variable, a hash table and an array into a subroutine like so subroutine($variable, %hash, @array); and pick it up like so sub subroutine { my($variable, %hash, @array) = @_; but it seems the array isn't being passed, I can print the contents of the arra