Connie Chan wrote at Wed, 03 Jul 2002 08:19:19 +0200:
> PS. You may run your script in shell ( perl yourscript.pl ), before you go on with
>the web
> browser... So it will direct tell you the syntax error at which line.. It saves your
>time to
> debug
Or to use a module doing this job:
us
I'm still getting the $name requires explicit package name.
Here is what I have in index.pl
#!/usr/bin/perl -wT
use strict;
use Data::Dumper;
use CGI qw( :standard );
print header ( "text/html" );
my $hash_ref = do ( 'fried.dat' ) || die "error: unable to open
fried.txt\n";
print Dump
scoping!!! my only scopes the end of the file!
so my in fried.dat is scoped only in fried.dat.
use our($name);
> -Original Message-
> From: Kyle Babich [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 03, 2002 9:19 AM
> To: [EMAIL PROTECTED]
> Cc: beginners-cgi
> Subject: Re: 2 Questi
Teddy,
Well, this works, I've tested it,
---
my $test = qq^
Index
About
^;
$test =~ s/href\=\"(.*?)\"/href\=\"another_text_$1\"/g;
print $test;
-
The reason the other even with an /s did not work was because
Todd,
Oh you mean like this:
my(@pairs) = split('&',$tosplit);
my($param,$value);
foreach (@pairs) {
($param,$value) = split('=',$_,2);
$param = unescape($param);
$value = unescape($value);
$self->add_parameter($param
Curtis,
Thank you for the compliment. Please do inform me of what should be modified.
Thanks,
David
- Original Message -
From: "Ovid" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, July 02, 2002 6:18 PM
Subject: Re: Form.pm
--- Todd Wade <[EMAIL
On Tue, 2 Jul 2002 10:43:22 +0300, [EMAIL PROTECTED] (Octavian Rasnita)
wrote:
>Hi all,
>
>Can someone explain why it is necessary to disable the file upload if I use
>CGI.pm?
>
>Of course, if I don't need to upload files with the script.
>
>Is it necessary to do that if I don't have an file uplo
Still getting the same problem, name requires explicit package name.
#!/usr/bin/perl -wT
use strict;
use Data::Dumper;
use CGI qw( :standard );
print header ( "text/html" );
my $hash_ref = do ( 'fried.dat' ) || die "error: unable to open
fried.txt\n";
print Dumper $hash_ref;
print <<"EndOfHT
To those who emailed me thanks for helping me figure this out. My code
doesn't look as
pretty. I had to remove all of the PrintTag's and output each line of
HTML with a print,
double quotes and semicolon, but everything is now working.
Maureen
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
The reason I explained how to slurp the file into a variable was so that it could be
printed anytime
anywhere. My solution does not force the file contents to be printed right away.
This is also
useful for if you wish to replace something in the faq before printing it, or adding
some to the t
hi everyone!
I created a password and username for my website. My question is how can i direct the
user to the homepage or main page of the website. Right now, the code is set for
"Permission Granted..." I want to direct the user to the main page of the website
after he/she is successful co
why's the our in $name? you don't even use $name anywhere else.
Here are some examples of "good" code using some of your ideas (still don't
know what you are trying to accomplish).
__CODE__
#!/usr/bin/perl -wT
use strict;
use Data::Dumper;
use CGI qw( :standard );
print header ( "text/html" );
Hi David,
I hope you don't take this stuff personally. A code critique is a critique, after all
:)
I'll skip the lines of code that I'm not commenting on.
my $input = shift;
my @variables = split(/\&/, $input);
First, we know that the split is incorrect. A semi-colon is the new, pre
--- [EMAIL PROTECTED] wrote:
> Todd,
> Oh you mean like this:
>
> my(@pairs) = split('&',$tosplit);
> First, the above code is strait out of CGI.pm sir. So if you feel that its wrong,
>you might try
> telling that to the creator of CGI.pm
David,
You ha
sub gotoMainScreen()
{
print "";
}
#
=
Original Message Follows
From: Rhen Hernandez <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: Username & Password Question
Date: Wed, 3 Jul 2002 08:30:35 -0700
hi
--- Kyle Babich <[EMAIL PROTECTED]> wrote:
> Still getting the same problem, name requires explicit package name.
>
> #!/usr/bin/perl -wT
> use strict;
> use Data::Dumper;
> use CGI qw( :standard );
>
> print header ( "text/html" );
>
> my $hash_ref = do ( 'fried.dat' ) || die "error: unable t
Change access granted to be:
sub accessgranted
{
print>>End
http://www.page.com/entrypage.html";>
End
print header;
print>>Body
Thank You
Permission has been granted $username.
Enjoy the site.
If the page doesn't take you there in 5 seconds, please http://www.page.com/
I might have suggested doing authentication a little bit differently, as it
appears that you are using a plain text file with unencrypted
username/password data. But if you just want to redirect based on what
you've got and you're not extremely concerned about security in this
instance, this shoul
--- Rhen Hernandez <[EMAIL PROTECTED]> wrote:
> here's my code:
>
> #!/usr/bin/perl
>
> use CGI qw/:standard/;
>
> my $username = param(USERNAME);
> my $password = param(PASSWORD);
>
> open(FILE, "data.txt") ||
>die "The database could not be opened";
>
>while()
>{
> @data
I'm trying to import scalars from an external file (fried.dat) and print
them in the current file (index.pl).
- Original Message -
From: "Nikola Janceski" <[EMAIL PROTECTED]>
To: "'Kyle Babich'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, July 03, 2002 11:37 AM
Subject: RE:
Curtis,
Of course I'm not going to take this personally, this is the very reason I
submitted the code.
I appreciate your feedback. The reason I was frustrated with Todd is because it was
strictly
criticism. Basically the tone was "Your wrong, and you shouldn't be making your own
lib anywa
> Thank you. I've seen that "buffer overflow" term on many lists,
> and I know it is something bad, but I don't know what it is
> unfortunately.
>
> Cheers.
Octavian, maybe these definitions will help.
#
buffer
--
On Wed, Jul 03, 2002 at 11:22:49AM -0600, [EMAIL PROTECTED] wrote:
>I do handle POST, I guess I didn't make that clear before. Read through the
>attached lib and
>you will see that is true. That is what parse_mform_input is about.
Ok ... maybe this is a stupid question (i'm juz a newbie =p
Niko,
As I said in the bottom of that email, that is one of the optional features I will
provide in
the future, to allow acceptance of get along with post.
David
- Original Message -
From: "Niko Gunadi" <[EMAIL PROTECTED]>
To: "Beginners cgi" <[EMAIL PROTECTED]>
Sent: Wednesday, Ju
Janek,
Yes, I could have shorter lines at the cost of the number of lines. Personally, I
like taking
things like this:
--
if ($thisvar eq $thatvar and $thatvar eq $anothervar){
print "all three were the same\n";
}
--
I need to access a database run by my service provider. They provide
the database administration tools via the web, and Perl is available for
CGI's (which I've abused abundantly), but if I so much as say
use DBI;
I get an internal server error. Is there anyway that I can sort of hack
my way a
<[EMAIL PROTECTED]> wrote in message
00d301c222b6$440166d0$d381f6cc@david">news:00d301c222b6$440166d0$d381f6cc@david...
>
> I appreciate your feedback. The reason I was frustrated with Todd is
because it was strictly
> criticism. Basically the tone was "Your wrong, and you shouldn't be
mak
Can you telnet or SSH into your server? Do they have the CPAN module
installed? If the answers to those 2 questions are yes, try
perl -MCPAN -e 'install Bundle::DBI'
I don't *think* this module is of the pure perl variety, so my suspicion is
that it has to be installed by whoever is root
<[EMAIL PROTECTED]> wrote in message
008801c222a5$a7c3cb10$d381f6cc@david">news:008801c222a5$a7c3cb10$d381f6cc@david...
> The reason I explained how to slurp the file into a variable was so that
it could be printed anytime
> anywhere. My solution does not force the file contents to be printed
ri
I did not say that you said this. I did say that was the tone (or feeling created
based on what
was said). I knew you had mentioned the ; vs & thing before. But at that time, I
still did not
have a solutions to replace it with.
I understand the frustration of telling somebody somethin
--- [EMAIL PROTECTED] wrote:
> I would be happy to take a look at, but I am uncertain how to access this
>archive. I remove
> the
> emails I get from mailing lists each day, and don't have past records other than
>emails I have
> sent.
> Perhaps you could reply with the proper solution, or
Of course, and usually that's the way I do it. Basically, if you put the local
statement in a
block, then the scope of the change to the system variable is only effective inside of
the block.
Just like if you did this:
--
{
my $cool = "stuff";
print q
Duh, I should have thought of that one.
So the only time this would be an issue is if somebody not knowing that ; can be a
element delimiter
creates an href with a ; in the name or value. Ok, that solution works for me.
Thanks,
David
- Original Message -
From: "Ovid" <[EMAIL PROTECTE
Hi,
When my form processess it needs to ftp into a site to grab information - can I use a
here document for that? Any quick example please.
Thanks, Rob
Todd Wade <[EMAIL PROTECTED]> wrote:
wrote in message
008801c222a5$a7c3cb10$d381f6cc@david">news:008801c222a5$a7c3cb10$d381f6cc@david...
>
Sorry for bothering everyone again, but could someone tell me what to change
so that I can import variables from external files and get them to work in
the current file? (see original message)
Thank you,
Kyle
- Original Message -
From: "Kyle Babich" <[EMAIL PROTECTED]>
To: <[EMAIL PROTE
35 matches
Mail list logo