I'm a bit confused -- I thought I was posting through a USENet server, and I
guess it's actually more like a mailing list. I guess I need to find a FAQ
to check and see what I missed.
Anyway, you've hit it. I got a few answers on IRC somewhere around 4 am, and
after waking up and thinking
NAME
beginners-faq - FAQ for the beginners-cgi mailing list
1 - Administriva
1.1 - I'm not subscribed - how do I subscribe?
Send mail to [EMAIL PROTECTED]
You can also specify your subscription email address by sending email to
(assuming [EMAIL PROTECTED] is your email
The following line works from a script run from the command line on the
server...
$sql = UPDATE data SET CustNo = $custNo, PIN = $pin, Notes = '$notes'
WHERE CustNo = $custNo and PIN = $pin and CustName = '$custName' and
Serial = '$serial';
but when run from cgi I get the following error...
Rob wrote:
The following line works from a script run from the command line on the
server...
$sql = UPDATE data SET CustNo = $custNo, PIN = $pin, Notes = '$notes'
WHERE CustNo = $custNo and PIN = $pin and CustName = '$custName' and
Serial = '$serial';
but when run from cgi I get the
-Original Message-
From: Rob [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 15, 2002 2:24 PM
To: [EMAIL PROTECTED]
Subject: database update
The following line works from a script run from the command
line on the
server...
$sql = UPDATE data SET CustNo = $custNo, PIN =
ok, i just setup a new server (redhat 7.3) and my guy says that the
dbd/dbi stuff is configured for perl-to-mysql connectivity, but i get
the following error message in my error log each time i try to run a
script from either the command line or via the browser:
---
Jim Lundeen wrote:
ok, i just setup a new server (redhat 7.3) and my guy says that the
dbd/dbi stuff is configured for perl-to-mysql connectivity, but i get
the following error message in my error log each time i try to run a
script from either the command line or via the browser:
Easy way to check is:
perl -MDBD::mysql -e1
Cheers,
Kevin
On Thu, Aug 15, 2002 at 03:44:23PM -0500, Mike(mickako)Blezien ([EMAIL PROTECTED])
said something similar to:
Jim Lundeen wrote:
ok, i just setup a new server (redhat 7.3) and my guy says that the
dbd/dbi stuff is configured for
Hi I have a question please. My ISP have not instaled a Perl Module whitch I need for
my script. So my script doesn't work. I am a programer so I remember it is a way to
add functions (methods) from that library to the script and you not need that library.
Your script will get the methosds
On Thu, 15 Aug 2002 at 16:37, Jim Lundeen opined:
JL:ok, i just setup a new server (redhat 7.3) and my guy says that the
JL:dbd/dbi stuff is configured for perl-to-mysql connectivity, but i get
JL:the following error message in my error log each time i try to run a
JL:script from either the
Probably a simple problem, hopefully with a simple answer.
I recently moved my web domain to a new host service and suddenly my scripts
don't work. The scripts were ones I had downloaded from Matt's Script
Archive, and they worked fine on a previous server. I changed the /home
directory
Find an html page that you've received and look at the source and header.
You should see a line something like: Content-type:text/html (Capitalization
and spelling DO count, so double-check them). This is the key to having the
recipient's mail client treat your message as an html formatted
how do i solve this?
my $line=abcdefgh;
i want output which has 8 lines:
1st outline: abcdefgh
2nd outline:ab bc cd de ef fg gh
3nd outline:abc bcd cde def efg fgh
4th outline...so on
please let me know the shortest code tp perform this. i can run it but lot
of code..
thanks!
--
To
Nikola Janceski wrote:
WTF doesn't perl -c check for valid subroutines/function calls?
I can write a perlscript calling a function that doesn't exist but perl -c
will say syntax ok.
ie:
% perl -ce nothing_here('some junk')
-e syntax OK
% perl -e nothing_here('some junk')
Undefined
# compares lines in 2 files, shows set difference
# call as: myprog file1 file2
while ()
{
/(\S+)/ and $seen_in_file1{$1} = +1;
Did you mean $seen_in_file1{$1} += 1;
When you give the diamond operator it tries to open
all you command
line args as files one after the
I'm developing a site on which it's a requirement for a user to login with
user id and password to gain access. The site is running on IIS and binding
to an LDAP (X500) directory where data is held. What I ideally wanted to do
was use a session type variable (as can be achieved in ASP) but
on Thu, 15 Aug 2002 08:40:16 GMT, Shivani wrote:
my $line=abcdefgh;
i want output which has 8 lines:
1st outline: abcdefgh
2nd outline:ab bc cd de ef fg gh
3nd outline:abc bcd cde def efg fgh
4th outline...so on
please let me know the shortest code tp perform this. i can run it
on Thu, 15 Aug 2002 05:05:15 GMT, Shane Laffin wrote:
How do I compare two dates in the format:
Thu Aug 15 2002 15:12:02
to return if one date is higher than the other.
Does anyone have any ideas on suitable modules, most
the date modules I have looked at dont deal
On Thu, 15 Aug 2002 01:40:16 -0700, [EMAIL PROTECTED] (Shivani)
wrote:
how do i solve this?
my $line=abcdefgh;
i want output which has 8 lines:
1st outline: abcdefgh
2nd outline:ab bc cd de ef fg gh
3nd outline:abc bcd cde def efg fgh
4th outline...so on
please let me know the shortest
Oops... so the OP just need this ??
I still can't read the logic, but :
# perl
use strict;
my $line=abcdefgh;
print Outline 1: $line\n;
for my $cut (2 .. length($line))
{ my @round = $line =~ /(?=(.{$cut}))/g;
print Outline $cut: @round\n;
}
Can do the same =)
Rgds,
Connie
- Original
On Wednesday, August 14, 2002, at 06:29 , Scott Ding wrote:
[..]
One issue came up with is that when an email that
contains person's name like WaalvÂg Scott or Mike
ÿyvind, the perl script doesn't print them correctly,
meaning, the names is not saved in the file correctly.
[..]
this looks
On Wednesday, August 14, 2002, at 10:52 , Mark Goland wrote:
Hi falks,
Does anyone know of a way I can send RPC to my server ??
http://search.cpan.org/search?mode=allquery=RPC
tells me there are a variety of modules that are working
in that space - so a part of the question is whether you
-Original Message-
From: Joe Echavarria [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 15, 2002 1:55 AM
To: [EMAIL PROTECTED]
Subject: Sending emails as html pages.
Hi there,
I have a script that it's output is a html page. How
can i send the html page exactly how it
From: Joe Echavarria [EMAIL PROTECTED]
I have a script that it's output is a html page. How
can i send the html page exactly how it is?, the
contents like the one that is on the web server. It is
something like the emails we receive from red hat brim
, oracle and others companies.
Search
I have amended the first few lines, this works but I
wonder if this bad...
Priss
while ()
{
/(\S+)/
and $seen_in_file1{$1} += 1;
push @tmp, $_;
}
open (FILE, @tmp);
while (FILE)
--- Priss [EMAIL PROTECTED] wrote:#
compares lines in 2 files, shows
hello people i am trying to parse a radius log with a regexp provided by
rob,the regexp used to work with a cisco cdr log and i am trying to
adapt it to parse a radius log. I am trying to get the NAS-IP-Address
parameter but i get the following output:
perl optrad.pl
Argument IP isn't
-Original Message-
From: Rob [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 15, 2002 10:08 AM
To: [EMAIL PROTECTED]
Subject: Status of db insert?
Hi, I've recently started using PostgreSQL and am trying to
load a table
from a file. The file has 4275 records in it but the
On Thursday, August 15, 2002, at 07:10 , Shishir K. Singh wrote:
I am trying to download ActivePerl5.6.1 for solaris from active states
perl's site. However there are two options..pkgadd and AS package. What
does pkgadd mean ? Which one do I need to install ?
pkgadd is one of the tools
pkgadd is one of the tools used in the Solaris implementation
of the SYS V packages model.
cf man pkgadd
For my money - it would be simpler to use the pkgadd command
on a Solaris Box.
f also the regular suite of tools
pkginfo
pkgrm
.
if the folks at
Shane Laffin [EMAIL PROTECTED] writes:
Hello List,
How do I compare two dates in the format:
Thu Aug 15 2002 15:12:02
to return if one date is higher than the other.
Does anyone have any ideas on suitable modules, most
the date modules I have looked at
On Thursday, August 15, 2002, at 06:55 , Kay Röpke wrote:
On Thursday, August 15, 2002, at 03:12 PM, drieux wrote:
so all I really want to know is
what is the canonical orthodox perl way
as executed in the canonical orthodox apple way?[4]
The orthodox perl way is laid
On Thursday, August 15, 2002, at 07:31 , Shishir K. Singh wrote:
[..]
I am tried to install The AS Package for Solaris on
Solaris..however..seems tat the *.gz file is not complete. Gives a
checksum error when I try to untar it. Has anyone else had the same
problem ?
p0: which rev of
p0: which rev of Solaris are you working with?
eg: both the OS rev 5.X and the Arch - sparc XOR i386
Machine hardware: sun4u
OS version: 5.8
Processor type: sparc
Hardware: SUNW,Ultra-5_10
p1: are you using gunzip to deal with unpacking them?
gzip -d/gunzip
Looks like you got an incomplete download.
Try re-dl-ing it.
I think it wouldn't have gunzipped in the first place if the file was incomplete.
gzip -t ActivePerl-5.6.1.633-sun4-solaris.tar.gz returns success.
But just to be on the safe side, I repeated the download/unzip process 3
Can anyone list some resources or methods they use for debugging (Perl) CGI
scripts. How can I use CGI::Carp most effectively?
Does anyone have any recommended practices for graceful CGI error handling?
Is this something that should be built in a custom module for my site?
Sorry if these are
use CGI::Carp qw(fatalsToBrowser)
tail -f path_to_server_log
The 2 best tools out there! =)
John Pitchko
Data Services
Saskatchewan Government Insurance
David Simcik [EMAIL PROTECTED] 08/15/02 12:21pm
Can anyone list some resources or methods they use for debugging (Perl) CGI
scripts. How
-Original Message-
From: Nikola Janceski [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 15, 2002 12:44 PM
To: Beginners (E-mail)
Subject: undef of nested data structures
I am wondering how undef works.
perldoc -f undef
I know that undef will undefine a variable if used
From: Nikola Janceski [EMAIL PROTECTED]
I am wondering how undef works.
I know that undef will undefine a variable if used like
undef($scalar); I also know that it doesn't actually free up the
memory but tells Perl that it's now available to be recycled for other
data.
but what about
As a side note, you can play around with Devel::Peek to see how many
things are referencing a variable.
# perl -MDevel::Peek -e
'$foo=foo;$bar=\$foo;$zog=\$foo;Dump($foo);$bar=bar;Dump($foo);print
$foo;';
SV = PV(0x80f2424) at 0x810b3cc
REFCNT = 3
FLAGS = (POK,pPOK)
PV = 0x80f10a0 foo\0
On Thursday, August 15, 2002, at 11:08 , Phil Dobbin wrote:
On 15/08/2002 at 10:01, drieux, [EMAIL PROTECTED] wrote:
I will confess that I have not kept up with the macPerl side - and
was concerned when I learned that it had stalled out at around
perl 5.4(???) - correct me if I am wrong. I
On Wed, 2002-08-14 at 15:43, Nikola Janceski wrote:
Okay I understand the dynamic subroutine declarations.
but perhaps a warning should be made for -w or 'use warnings'?
It's just to find misspelled functions. I use 'use strict' for finding
misspelled vars.
Is there nothing for finding
Luckily this is a beginning perl list, because I'm sure this is a real
beginners question . . .
I believe I have the Mail::Mailer module installed on my system because when
I run 'perldoc Mail::Mailer' I get the documentation. However, when I try to
'use' the module, I get the following error
Try find / -name Mailer.pm
It should tell you where it is.
John Pitchko
Data Services
Saskatchewan Government Insurance
John Almberg [EMAIL PROTECTED] 08/15/02 01:39pm
Luckily this is a beginning perl list, because I'm sure this is a real
beginners question . . .
I believe I have the
Thanks, that worked. The path is:
/usr/lib/perl5.6/site-perl/5.6.1/Mail/Mailer.pm
Now here's the funny part . . .
running 'perl5 test.cgi' works, but running 'perl test.cgi' yields the
error. I'm guessing that these two different versions of perl search
different @INC paths and Mailer.PM isn't
On Thu, 2002-08-15 at 15:39, John Almberg wrote:
Luckily this is a beginning perl list, because I'm sure this is a real
beginners question . . .
I believe I have the Mail::Mailer module installed on my system because when
I run 'perldoc Mail::Mailer' I get the documentation. However, when I
# Any way to coax Apache into using perl5 to interpret my CGI scripts?
Duh! Talk about beginner questions. I figured this one out on my own. All
works fine, now! Thanks for all the quick and valuable feedback.
-- John
# -Original Message-
# From: John Almberg [mailto:[EMAIL PROTECTED]]
Jaquar is shipping with 5.8.0
~Eric
On 8/15/02 11:25 AM, drieux [EMAIL PROTECTED] wrote:
On Thursday, August 15, 2002, at 06:55 , Kay Röpke wrote:
On Thursday, August 15, 2002, at 03:12 PM, drieux wrote:
so all I really want to know is
what is the canonical orthodox perl way
as
I did little more study and it seems that the strings
I see in the /var/mail/user is quoted-printable
strings. I could use MIME::QuotedPrint to decode them.
I will give a try. Anyway, thanks drieux !!! I can
always count on your reply:)
=
Hail,
Oreilly's book says... To suppress this warning,
assign an initial
value to your variables.
what value should I attached to:
$content = $header_html . $1 . $footer_html;
from:
if($content=~m|BODY.*?(.*?)/BODY|si) {
$content = $header_html . $1 .
$footer_html;
I am writing a script to convert RTF to XML, and my output looks like
this: (I explain this ugliness below)
id1listlevel1
text
id1listlevel2
text
/id1listlevle2
/id1listlevel1
text
id1listlevel1
text
id1listlevel2
text
/id1listlevle2
/id1listlevel1
I know that is ugly to read, but I'm just
Hello,
I just read this in a forum and I have never heard of this before. He was
having problems with a variable not holding it's value when calling it from
a sub. He wrote back and said that this is what fixed it. Can anybody
explain this to me? Here's part of his post:
-
What
Batch M wrote:
Hail,
Hello,
Oreilly's book says... To suppress this warning,
assign an initial value to your variables.
what value should I attached to:
$content = $header_html . $1 . $footer_html;
from:
if($content=~m|BODY.*?(.*?)/BODY|si) {
$content =
Troy May wrote:
Hello,
Hello,
I just read this in a forum and I have never heard of this before. He was
having problems with a variable not holding it's value when calling it from
a sub. He wrote back and said that this is what fixed it. Can anybody
explain this to me? Here's part of
#! perl
use strict;
our $static = 'a,';
sub a { $static .= $static }
sub b { $static .= $static }
sub c { $static .= $static }
sub d { $static .= $static }
print a(); # a,
print b(); # a,a,
print c(); # a,a,a,a,
print d(); # a,a,a,a,a,a,a,a,
First, I would like to ask, is that a static var
John == John W Krahn [EMAIL PROTECTED] writes:
John You don't need a BEGIN block, a plain block will do.
.. provided you execute this block before you call the enclosed
subroutine. The BEGIN is more general, because it doesn't require
that.
--
Randal L. Schwartz - Stonehenge Consulting
hi,
You may declare my variables at the outermost scope of a file to hide any such
identifiers from the world outside that file. This is similar to C's static variables
when they are used at the file level. To do this with a subroutine requires the use of
a closure (an anonymous function
56 matches
Mail list logo