Hi,
If you don't define input line separator $/=undef; Perl reads line by line
only.
The below code is to match ignore case in regex.
$inputline=~m/[a-z]+/i;
Here i is used for ignore a case. It will match any group of character may
be lower or upper or mixed case.
Regards,
Ramkumar
Software
Huub [EMAIL PROTECTED] asked:
I'm adapting a Perl script using MySQL connectivity, and have
to compare a variable, e.g. $myvar, with the value NULL from
the database. In MySQL, I have to use the query 'where myvar
is null', which works great.
But when I try this in Perl, like 'if ($myvar
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:
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
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
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.
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 EXTERN.h
#include perl.h
static PerlInterpreter *my_perl; // Perl interpreter in my program
int main(int argc, char
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 unsubscribe,
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 Perl DBI
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, Jul 14,
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
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] wrote:
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 removed
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 ?
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 may
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
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 redirector
*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,
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 beginners@perl.org
Cc: luke devon [EMAIL PROTECTED]
Sent: Monday, July 14, 2008 16:05:21
Subject: RE: Perl script doesnt behave well
luke
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
?
- Original Message
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 doesn't.
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!
#! /usr/bin/perl
use warnings;
use strict;
open (PTR1, filename.txt) or die Unable to open file filename.txt :
$!\n\n;
while (chomp ($str = PTR1))
{
sscanf($str, %5d %11.2f, $data1, $data2);
# do whatever processing.
}
close (PTR1);
Regards,
Amit Saxena
On Mon, Jul 14, 2008
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
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
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, how to read these data
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{USERNAME}
Using
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 many other
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.
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
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 does not have any set
[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 in perl?
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
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
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 EXTERN.h
#include perl.h
static PerlInterpreter *my_perl; // Perl interpreter in my program
int
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 from
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 PROTECTED]
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 some body
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 =
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 want to
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
file4
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
my $record =
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 trying to be too clever but I
Rob Dixon wrote:
Amit Saxena wrote:
while (chomp ($str = PTR1))
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 number of
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
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 newline
Amit Saxena wrote:
#! /usr/bin/perl
use warnings;
use strict;
open (PTR1, filename.txt) or die Unable to open file filename.txt :
$!\n\n;
while (chomp ($str = PTR1))
{
sscanf($str, %5d %11.2f, $data1, $data2);
# do whatever processing.
}
close (PTR1);
Regards,
Amit Saxena
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/
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 = {
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
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' for
an
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,
Brad Baxter wrote:
Amit Saxena wrote:
#! /usr/bin/perl
use warnings;
use strict;
open (PTR1, filename.txt) or die Unable to open file filename.txt :
$!\n\n;
while (chomp ($str = PTR1))
{
sscanf($str, %5d %11.2f, $data1, $data2);
# do whatever processing.
}
close
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;
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=gmailmode=module
--
To unsubscribe,
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 many
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;
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 please advice me how to
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:
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
[ 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
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
[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 achieve by
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;
open (PTR1,
64 matches
Mail list logo