my ($mollusc) = (param('mollusc') || '') =~ /^(\w+)$/;
Works fine and no error messages -- Thank you very much
F
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
From: Janek Schleicher <[EMAIL PROTECTED]>
Subject: Re: uninitialised value in pattern match
Date: Tue, 24 Sep 2002 13:10:28 +0200
> ^^^
> There misses a ' quote.
> (Don't retype code, put & paste instead).
>
> >causes:
> >"Use of inititialized va
Hello,
I have one problem ( actually I'm sure I have many but haven't
realised it yet ) that I'm stuck on.
the following line ( and several others like it ) produce the
following error :
( my $mollusc ) = ( param( 'mollusc ) =~ /^(\w+)$/i );
causes:
"Use of inititialized val
From: "Octavian Rasnita" <[EMAIL PROTECTED]>
Subject: What editor for Perl do you recommend?
Date: Mon, 24 Jun 2002 08:06:40 +0300
> Hi all,
>
> Can you recommend me a good editor for Perl scripts that runs under Windows?
> It should:
>
> 1. Save the text with Unix end of lines.
> 2. Write some
I am not a perl expert by a very very long way but I remeber solving
something like this once by outputting a separate as I iteratred
over the results from a query.
Hope it helps
F
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
You sound desperate. I am not able to write a suitable script myself
(lack of knowledge and time ) but o'reillys cgi with perl book has a
basic shopping cart in it ( though not if I remember correctly ) with
mysql.
Hope this helps
Francesco
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For add
If you look at O'Reilly's cgi programming with perl book there is a
mechanism there which can be modified to do exactly what you want.
The following was adapted from it :
# initialise subject listings one section per subdirectory under
# ../data
opendir ( DIR, "../data" ) or die "Cannot open s
Thanks - sorted!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi,
The following line returns a value of 1 (one) - presumably to confirm
a match. What am I missing such that $subject contains the value of
the param ( if matches ).
( my $subject ) = ( param( 'subject' ) =~ /^(\w+)$/i ) || '';
TIA
Francesco
--
To unsubscribe, e-mail: [EMAIL PROTECTED
Hi,
I have just spent two hours trying to figure out why a perfectly good
script had failed!! The old script headers error.
Answer:
I had inadvertently put a space in front of the # at the beginning of
the #!. The space is, of course covered by the cursor when I visit
the beginning of the file
Most ( ? all ) of the distributions have specific mailing lists. I
subscribe to the SuSE list which is excellent. Once you have made the
change you will never want to go back. Good luck.
Francesco
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi,
I have a script which generates clickable file listings ( a click on
which displays the file and appends the contents of a comment file ),
so far so good. The filename, subject directory etc are passed around
by hyperref as in
$heading
etc etc.
When I wish to add a comment the arguments a
Hi,
I have a script which generates clickable file listings ( a click on
which displays the file and appends the contents of a comment file ),
so far so good. The filename, subject directory etc are passed around
by hyperref as in
snip snip
PS Forgot to add that the code which generates the fo
THanks,
I tried substituting:
flock(WRITE_COMMENT, (LOCK_EX() || die("cannot lock comment file: $!")));
to no avail. THe file has been previously opened (for reading) and
then closed after, prior to being opened by another sub for
appending. The code I used to append worked as part of a stand
Hi,
I have a script which collects a comment than should write it to a
file. Initialy several scripts did individual jobs but I am combining
them. the opening gets the details like this:
my $email = param( 'email') || '';
my $text= param( 'text' ) || '';
my $name
Thank you very much for that. I am amazed at how you find the time to
help as much as you do. I shall endeavour to continue to learn.
Cheers again
Francesco
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi again,
the script now reads ( see below ) but I still get errors as follows:
** (at end of line) = where use of uninitialised value in cancatenation and
*** (at end of line) = where use of uninitialised value in pattern
match
How should I initialise those values?
Cheers
Francessco
#!/us
Hi,
I have been playing around with the rat book but have the following
problem:
The attached snippet of code produces errors of unitialised value
strings for the lines I have marked. The script compiles OK. What
obvious newbie thing am I missing?
Cheers & Thanks
Francesco
#!/usr/bin/perl -
Hi,
I have a site running locally under /home/me/public_html. With
sub-folders of cgi_bin and data. What are considered to be the best
permissions for the directories and files. I want to copy this accross
to a server. Data files are created dynamically from a script running
on the local machi
I am beginning to wish I had not posted the question about parsing the
info tacked on to the url, because of all the contention it seems to
have caused. I apologise. I am working my way through the rat book
and am implementing the news example but without using embperl (as an
exercise). My erro
/bin/perl -w
alenzen::> use strict;
alenzen::> use CGI qw(:standard);
alenzen::> my $file = param("filename");
alenzen::> #now the blahblah bit is extracted and saved in $file
alenzen::>
alenzen::>
alenzen::> -Ursprüngliche Nachricht-
alenzen::> Von: Fra
Hi,
THis is probably a simple question. Am new to perl and CGI so please
have mercy. I have a script which displays a list of files with links
to them. The links when hovered over in a browser show as:
display_file.pl?filename=blahblah
How can I extract the blahblah bit (which is the name of
Hi,
I have been working through the rat book. Does anyon know of anything
similar to the "Whats new" examples in chapter 6 that do not use
embperl. I use SuSE and do not want to mess up my apache installation
(am new to this) as it contains the help system. I do not have
embperl installed.
TI
I always felt it dated back to Oppenheim and the first 'bomb' f?
up beyond all repair - it was a reference to a storage hanger that
they had
Francesco
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
please ignore my dumbass previous post - I was looking in the wrong
place. THe error lies in the missing : in the use cgi line
Aplogies but have been looking at this for 30 minutes
Francesco
Hi
And thanks again.
Can anyone suggest why the following gives me an error of:
'no comma allowed after filehandle at /cgi-bin/filename line 13'
Line 13 is the print header, start_html( etc etc one
A script which begins in exactly the same way does not do this (and
alos runs fine).
#!/usr/bi
Your simplified version worked fine - thank you - your deduction
regarding the quoting seems to have been correct. Apologies for not
replying earlier but BT (who seem to own our wan) decided to block
everything but 'web' from our site and it has taken until now to get
smtp and pop reinstated.
Th
The following still reports nil records (I know they are there -
honest!!).
TIA - Francesco
#!/usr/bin/perl -w
#
# test script to query an mysql database
#
use strict;
use DBI;
my ($sql, $dbh, $sth, $field1, $value1, $field2, $value2, @rows, $counter);
print "Enter the first fieldname (field1)
Thanks and Hi again,
Tried unescaping and got no joy so tried the following - still with no
joy -any suggestions as to which obvious thing I am missing.
#!/usr/bin/perl -w
#
# test script to query an mysql database
#
use strict;
use DBI;
my ( $dbh, $value1, $value2, $sth, @rows, $counter, $fiel
Apologies for posting a small script. I created a little test table
with columns testname, testsex, testage and testcolour. The script
runs without errors yet the value of returned rows is always zero.
Please would someone be so kind as to point out the error of my ways.
TIA
Francesco
#!/usr/
mysql
Thanks
F
Hi,
Is it possible to embed a scalar into the sql such that the value of
the scalar could represent a column name to report or a value to
select by
eg something to mean the following
select $column_name from test where $another_column_name =
$column_value
or even better:
count rows where $col
Hi,
My first post so please have mercy.
I have written a thing to collect about 45 items of data about certain
events and it works. (Having said which, after watching this list for
a few days I think I should re-write much of it). This data is fed
into a single table on a mysql database.
I ne
33 matches
Mail list logo