--- 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(<FILE>)
>    {
>       @data = split(/\n/);

Hello Rhen,

Unless you have something very weird in your Perl installation, this is effectively a 
no-op.  The
while loop is reading in lines with the input line separator (unless set to something 
else),
usually being something like "\r\n" or "\n".  Since that's at the end of each scalar 
you're
reading, your split is acting like some weird chomp.

As for your actual, question, I'm going to sidestep it (as others have answered 
already) and
suggest that you read 
http://www.easystreet.com/~ovid/cgi_course/lesson_four/lesson_four_2.html. 
There are some issues with your code that are covered in the above link.

Cheers,
Curtis "Ovid" Poe

=====
"Ovid" on http://www.perlmonks.org/
Someone asked me how to count to 10 in Perl:
push@A,$_ for reverse q.e...q.n.;for(@A){$_=unpack(q|c|,$_);@a=split//;
shift@a;shift@a if $a[$[]eq$[;$_=join q||,@a};print $_,$/for reverse @A

__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to