I don't know why the shorter version isn't working for you.
I know the basic code fragment itself is fine.
I notice that your shorter version has four dashes rather
than the five in the longer version. Is that it? Other than that,
I suggest you use the debugger or just pile in prints to see
what'
First:
Can't modify subroutine entry in character translation at
...ESEC_VALIDATE.pm line 31, near "tr /[a-z]/[A-Z]/;"
The matching line is:
$q->params('company') =~ tr/[a-z]/[A-Z]/;
This line attempts to change the thing on the left hand side,
and perl doesn't see the thing on the
Hi
I am sure this is not supposed to be so hard but I still cannot get the hang
of passing these objects around.
What I am trying to do is work with CGI.pm
I have a cgi object and I also want to break my program up into subs to keep
it clean and easy to code.
So I create a CGI object. It's gre
At 09:55 PM 7/4/2001, Tim Musson wrote:
>Hey RL,
>
>Wednesday, July 04, 2001, 9:41:19 PM, my MUA believes you used
>QUALCOMM Windows Eudora Version 5.1 to write:
>
>
>snip --
>
>RA> When I run it in my ActivePerl.exe window --
>RA> nothing happens.
>
>Not sure what that is... Did you get you
Hey RL,
Wednesday, July 04, 2001, 9:41:19 PM, my MUA believes you used
QUALCOMM Windows Eudora Version 5.1 to write:
snip --
RA> When I run it in my ActivePerl.exe window --
RA> nothing happens.
Not sure what that is... Did you get your "ActivePerl.exe" window by
running perl.exe from W
On Jul 4, RL Autry said:
>By the way is everyone getting two for one emails or just me?
You're getting two when people reply to you. That's because many mail
clients will reply to the originator of the email, as well as the people
being Cc'ed, which includes this list. And you get a copy from
At 08:47 PM 7/4/2001, Daniel Dwyer wrote:
>#!/usr/bin/perl -w
> use strict;
> while (<>) {
> if ( /book/i or /bk/i) {
> print;
> }
>}#missing this one
Ok I get it so for every bracket I have to have an ending bracket.
Very good thanks.
By the way is everyone getting two for one emails or ju
> A friend of mine sent me a file to write
> to help get me started on programming Perl.
> So I did (in notepad):
>
> #!/usr/bin/perl -w
> use strict;
> while (<>) {
> if ( /book/i or /bk/i) {
> print;
> }
> Missing right curly or square bracket at findit.pl line 6, at end of line
> syntax erro
Solaris 2.6!
isn't the newest one solaris 8? i downloaded it the other day its great!
3 cds..
Ryan
On Wed, 4 Jul 2001 [EMAIL PROTECTED] wrote:
> I currently use Perl v 5.0005_3 on Sun Solaris 2.6 What are the
> precautions I need to take if I want to upgrade to Sun Solaris 2.8?
>
> Jeremy Pa
Ultra edit is the best for windows..
Ryan
On Wed, 4 Jul 2001, Rajeev Rumale wrote:
> You must have got many good ones by now.
> If not here is one more shareware. http://www.ultraedit.com
>
> Rajeev
>
> ~~~
> Rajeev Rumale
> MyAngel.Ne
Use KDE with the advanced text editor it does all that ..
but you gotta use linux.
Ryan
On Tue, 3 Jul 2001, RL Autry wrote:
> We are very new to programming and especially to Perl.
> We were following this thread closely and only saw a couple
> of replies. Wondering if there are any other edit
Hi again Me,
further to my thanks, I've had a look at your suggestions. As it
turns out it's your last (less obfuscated) solution that I needed. I've
attached a working example.
However, it was the more obfuscated ones I thought I understood better, but
when I try the second one (to mat
A friend of mine sent me a file to write
to help get me started on programming Perl.
So I did (in notepad):
#!/usr/bin/perl -w
use strict;
while (<>) {
if ( /book/i or /bk/i) {
print;
}
He told me to name it findit.pl
I did.
Then he instructed me to write a text file named txtlist.txt.
and g
Dear Me,
thanks for the great explanations! There is definitely MTOWTDI.
Shame I found one of the ways NOT to do it (but of course there are
infinitely more of those, so it's easier 8-). I'll examine each of your in
more detail and try each of them out - thus, hopefully, I'll learn some
On Wed, 4 Jul 2001 [EMAIL PROTECTED] wrote:
> I have a webpage that accepts user input; it is initially processed by a
> Perl program. From that Perl program, I need to pass variables to an
> Oracle PL/SQL procedure. How?
>
> I reviewed several books and online sources and have tried anything t
I have a webpage that accepts user input; it is initially processed by a
Perl program. From that Perl program, I need to pass variables to an
Oracle PL/SQL procedure. How?
I reviewed several books and online sources and have tried anything that
looks similar to what I want to do, but nothing ha
Hi,
from what i gather, you're trying to install perl on a windows system...
for easy installation and documentation, as well as obtaining extra modules
easily (via ppm) you might want to concider checking out AS' perl.
you can get it here:
http://aspn.activestate.com/ASPN/Downloads/ActivePerl/
Hi group, just wanted to thank all who helped me out with this little problem,
particularly Paul Johnson who's input ended up being the key to my problem.
I appreciate all of your help!
-Dave
John Edwards <[EMAIL PROTECTED]> wrote:
>Here's a solution I sent to the group earlier...
tnx, but I used simpler regexp since IP numbers which I use are already
verified as valid.
>For the array thing, have you considered using a hash instead?? How do you
>know where to insert the data in the ar
Hello SAWMaster,
Wednesday, July 04, 2001, SAWMaster <[EMAIL PROTECTED]> wrote:
S> Paul, yeah the print is there just to help me debug. Isn't <> the
S> same as ? Are you saying I should change that?
<> is not the same as STDIN. see preldoc perlop, I/O Operators.
The null filehandle <>
On Wed, Jul 04, 2001 at 12:32:27PM -0500, SAWMaster wrote:
> Paul, yeah the print is there just to help me debug. Isn't <> the
> same as ? Are you saying I should change that?
Yes, that's what I'm saying, and no, they're not the same.
Take a look at perlop to find out exactly what <> is doing
Dave,
I tested it with the <> on both *nix and windows - both worked with no
problems. I'm guessing that it may be beneficial to see the whole
program.
--Bill
- Original Message -
From: "SAWMaster" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 04, 2001 1:32 PM
Su
Paul, yeah the print is there just to help me debug. Isn't <> the same as ?
Are you saying I should change that?
Bill, it is a perl file that I used pl2bat to convert to a batch file. I can run it
either way, as a .pl or as a .bat...the result is the same.
-Dave
man nice. perl doesn't seem to have a nice function. so you might have to invoke
the nice system call. you could also take a look at setpriority (linux, *BSD, SYSV
should
support it too). using it you can alter the scheduling priority of a process, children.
/kk
On Wed, Jul 04, 2001 at 11:15:24AM
Dave,
Are you running this as a batch file, or as a PERL file?
--Bill
- Original Message -
From: "SAWMaster" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 04, 2001 12:48 PM
Subject: Mysterys of the Unknown STDIN
I'm working on a fairly lengthy ( for a newbie like me
On Wed, Jul 04, 2001 at 11:48:51AM -0500, SAWMaster wrote:
> I'm working on a fairly lengthy ( for a newbie like me) program that
> has two modes. The user can type "mine blah" and my program will find
> all "blah" or he/she can type "mine !" to enter interactive mode. The
> problem is that when
I'm working on a fairly lengthy ( for a newbie like me) program that has two modes.
The user can type "mine blah" and my program will find all "blah" or he/she can type
"mine !" to enter interactive mode. The problem is that when I get to this snippet:
sub getinteractivesearch
{
#pri
After reading a good portion of the questions here I wonder if my
question will be answered.. Anyway, I'm trying to install perl. I was
able to run \perl\p561\djgpp\configure.bat and go through the
configuration. It was my understanding that it should create the file
config.h in \perl\p561. I
yes, sorry, i am using use Getopt::Std; in my code as well. sorry that i
forgot to include that in the code, however it is there in the script.
On Wed, 4 Jul 2001, Pierre Smolarek wrote:
> use Getopt::Std;
>
> ?
>
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: "Perl Discuss" <
On Jul 4, Josh said:
>[Jul 4 13:55:03 small sendmail[29727]: NAA29721: to=<[EMAIL PROTECTED]>,
>delay=00:00:00, xdelay=00:00:00, mailer=uucp-dom, relay=gate, stat=Sent ]
> if ($record =~ /^(...)\s+(\S+) (..):(..):(..) \S+
>sendmail.[0-9]+.: (\S+): to=(\S+).*, delay=..:..:.., xdelay=..:..:..,
>m
use Getopt::Std;
?
- Original Message -
From: <[EMAIL PROTECTED]>
To: "Perl Discuss" <[EMAIL PROTECTED]>
Sent: Wednesday, July 04, 2001 3:54 PM
Subject: using getopt specifying ARGV values per flag
> my script is as follows:
>
> #!/usr/bin/perl -w
>
> use strict;
> my $domain;
> my $pa
my script is as follows:
#!/usr/bin/perl -w
use strict;
my $domain;
my $path;
my %option;
getopts("nhfc",\%option);
i have 4 options set.
typically two will be used together n and f, however i am sure that end
users will type in 'script -fn' and 'script -nf'. my concern is that each
of these
Hi,
I need to kill a process if it has exceeded the allocated time eg,2 seconds.
In windows, i'm able to kill the application using the
Win32::Proces
how to achieve this in unix? or else is there a common
function available to kill the application.
perlport docs doesn't see
The answer here still gnu emacs. For NT, have a look at:
http://www.gnu.org/software/emacs/windows/faq.html
cheers,
mario
-Original Message-
From: RL Autry [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 04, 2001 3:01 AM
To: Kris G Findlay; Beginners perl; [EMAIL PROTECTED]
Subject: R
- Begin Forwarded Message -
Delivered-To: [EMAIL PROTECTED]
From: Jorge Goncalvez <[EMAIL PROTECTED]>
Subject: Re:Fileevent
To: [EMAIL PROTECTED]
MIME-Version: 1.0
Content-MD5: /MRgG3Z7C9HfGPjr7vRDqA==
X-Filtered-By: PerlMx makes it fast and easy. See
http://www.ActiveS
Hi Bill,
my choice is gnuemacs with cperl!
cheers,
mario
-Original Message-
From: Bill Pierson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 03, 2001 9:34 PM
To: [EMAIL PROTECTED]
Subject: Editor
Hello again, all.
May I get some suggestions for any Windows-based PERL development to
Hey Jos,
I would be interested in how you go about running it from the network.
For instance, when you install it on a net drive, does @INC reflect
the correct locations?
Wednesday, July 04, 2001, 3:47:28 AM, my MUA believes you used
Microsoft Outlook Express 5.50.4522.1200 to write:
JIB> I'm n
undefined reference to `boot_DynaLoader'
Is there a fix to the above error.. i thought i read somewhere that there was
perlcc used to work a dream, then i upgraded to 5.6.1 and it has never worked since
Pierre
I wanted the first book on Perl that I buy to be Learning Perl 3ed.
However, Learning Perl 3ed (Indian reprint) has so far not been released,
and worst of all, no one knows when it will be out.
Some people say it'll take a mth or two.
If I don't get a release date soon, I'll have to start with
Hi all,
i am trying to parse my sendmail log into scaler arrays. i have
been semi-successful but am still getting too many errors that i just cant
figure out what i'm missing. i have reread mastering regular
expressions and ch. 7 in learning perl.
the following is an example of one of the
Hello Sarton,
Wednesday, July 04, 2001, Sarton O'Brien <[EMAIL PROTECTED]> wrote:
SOB> The cgi running as the default ... nobody ... or whatever, doesn't
SOB> have permission to access the tables and I can't access the postgres
SOB> configuration files to allow connection locally from the user a
Yes. That's fine as long as you know that the data being passed contains a
valid IP address. If the data may contain an invalid IP (e.g
999.999.999.999), your regex will still match it as an 'IP'. It all depends
on where your data is coming from and if you trust that source...
John
-Original
Hello Jean-Paul,
Wednesday, July 04, 2001, Jean-Paul MiƩville <[EMAIL PROTECTED]> wrote:
JPM> Can you explain me how can I convert an hexadecimal number in decimal ?
unfortunatelly, i do not remember where i got this :(
bin2dec:
$out = unpack("N", pack("B32", substr("0" x 32 . $in, -32))
A simpler solution of checking for an IP address would be :
#! /opt/bin/perl -w
my($str) = 'This is a string with 192.19.2.13 in it';
while ($str =~ m/(\d+\.\d+\.\d+\.\d+)/g)
{
if (defined $1)
{
print "IP address is $1\n";
}
}
This just prints the IP address if there is one.
Ge
>From Programming Perl..
hex EXPR
This function interprets EXPR as a hexadecimal string and returns the
equivalent decimal value. (To interpret strings that might start with 0 or
0x see oct.) If EXPR is omitted, it interprets $_. The following code sets
$number to 4,294,906,560:
$number = hex("f
Is it possibly, and if so how, to change the cpu priority of a perl script or its
forked children?
Regards,
Pierre
Hi,
I have been coding a cgi to access some tables in a postresql RDBMS.
The cgi running as the default ... nobody ... or whatever, doesn't
have permission to access the tables and I can't access the postgres
configuration files to allow connection locally from the user associated with
the table
Hi,
Can you explain me how can I convert an hexadecimal number in decimal ?
For converting decimal in hexadecimal, I can use the function hex, but I
didn't find a function for converting hex in dec.
Thanks in advance,
Jean-Paul
___
Sen
Here's a solution I sent to the group earlier...
For the array thing, have you considered using a hash instead?? How do you
know where to insert the data in the array? Is it needed after another
value, or at a certain element??
John
-Original Message-
From: John Edwards
Sent: 14 June 2
I currently use Perl v 5.0005_3 on Sun Solaris 2.6 What are the
precautions I need to take if I want to upgrade to Sun Solaris 2.8?
Jeremy Parkes
This is pretty beginners question, how can I extract IP number from $s?
$s = "ALL: 172.184.70.165 # PORT: 59"
Pattern have to match four numbers separated by "."
Besides I have some array and need to insert some values into it(somewhere
in the middle). "perldoc -f splice" says that it only doe
Try this (hope'll work)
$pathto='c:/perl/eg/grades.txt'
open (GRADES,$pathto) or die
It works in Unix for sure , and probably in W too
If you use the file grade.txt for many times in your script and if you change it's
location , you'll change your script just once in the "pathto" variable
You might also want to think about setting $/ = "" rather than $/ = "\n\n".
Using "" will define the line separator as one *or more* blank lines, while
"\n\n" will match only a single one (so for example if there are three
consecutive \n's the third will be assigned to the next paragraph). See
per
I have the same problem with Apache / Win2000 if I run Apache as a
service. If I run Apache by itself (ie, start up from the command line,
not from the Services menu) I can shut down Apache if I get Perl in an
infinite loop, and then Task Manager allows me to shut down the Perl process.
I rec
At 17:12 03.07.2001 -0500, RL Autry wrote:
>This was originally on a UNIX machine.
>How can you know when you have a script that will work with your operating
>system?
>In this case Windows2000 Server.
You shouldn't have many problems going from UNIX to Win2000 -- I regularly
do the opposite,
At 20:00 03.07.2001 -0500, RL Autry wrote:
>We are very new to programming and especially to Perl.
>We were following this thread closely and only saw a couple
>of replies. Wondering if there are any other editors that would
>do all that is needed for Perl and possibly even C++, Java, Visual Basic
I'm not sure if this willl solve your problem, but we have the same
'problem' of not every workstation (around 800 or so) having perl installed.
So we put perl available on a network share on a server, and add it to the
path of the machines...
i could get you a more code like example when i'm at
Hello Joel,
I think that your problem is in the ppd file. If you open it up you will
see a bunch of stuff in there among which will be a line that looks like
this:
http://ppm.ActiveState.com/PPMpackages/5.6plus/MSWin32-x86-multi-thread/DBI.tar.gz";
You need to change this to be a relative pa
58 matches
Mail list logo