Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > How is this wrong? Please Help.

Reply
Thread Tools

How is this wrong? Please Help.

 
 
Big Dix
Guest
Posts: n/a
 
      12-30-2003
I am dealing with three different database files. If the user (me) chooses
to edit File 1 it opens File1.csv and so onfor File 3
But File three needs to written in a different format then File 1 and File
2.
My question is about line 4
I am getting an error. Why and what am I doing wrong that I am missing?
any ideas?
Thank you


1 $NextEntry = $perp_year;
2 if ($perp_mon < 10) { $NextEntry .= "0"; }
3 $NextEntry .= "$perp_mon";
4 if (($perp_day < 10) && ($editfiles = "File 3")) { $NextEntry .= "0"; }
5 $NextEntry .= "$perp_day\n";
6 elsif ($perp_day < 10) { $NewEntry .= "0"; }
7 $NewEntry .=
"$perp_day|$INPUT{'Add'}|$URL|$INPUT{'address'}|$I NPUT{'city'}|$INPUT{'state
'}|$INPUT{'zip'}|$INPUT{'phone'}|$INPUT{'time'}|$I NPUT{'FullText'}\n";



 
Reply With Quote
 
 
 
 
Rusty
Guest
Posts: n/a
 
      12-30-2003
Seeing that you provided no error message all I can go by is what is in
your post. Carefully look at line 4:

if (($perp_day < 10) && ($editfiles = "File 3")) { $NextEntry .= "0"; }

The second part of your conditional says to assign the string 'File 3'
to the variable $editfiles. I don't think you want to do this but want
to do a comparison.

Rusty


Big Dix wrote:
> I am dealing with three different database files. If the user (me) chooses
> to edit File 1 it opens File1.csv and so onfor File 3
> But File three needs to written in a different format then File 1 and File
> 2.
> My question is about line 4
> I am getting an error. Why and what am I doing wrong that I am missing?
> any ideas?
> Thank you
>
>
> 1 $NextEntry = $perp_year;
> 2 if ($perp_mon < 10) { $NextEntry .= "0"; }
> 3 $NextEntry .= "$perp_mon";
> 4 if (($perp_day < 10) && ($editfiles = "File 3")) { $NextEntry .= "0"; }
> 5 $NextEntry .= "$perp_day\n";
> 6 elsif ($perp_day < 10) { $NewEntry .= "0"; }
> 7 $NewEntry .=
> "$perp_day|$INPUT{'Add'}|$URL|$INPUT{'address'}|$I NPUT{'city'}|$INPUT{'state
> '}|$INPUT{'zip'}|$INPUT{'phone'}|$INPUT{'time'}|$I NPUT{'FullText'}\n";
>
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please please please help this guy with his open source java app casioculture@gmail.com Java 4 05-05-2005 08:24 AM
Console profile for Windows app in VC++ - PLEASE PLEASE PLEASE HELP! MuZZy C++ 7 01-07-2005 08:40 PM
Computer problems please please please help Nick Computer Support 0 06-04-2004 08:49 PM
HELP! HELP! PLEASE, PLEASE, PLEASE tpg comcntr Computer Support 11 02-15-2004 06:22 PM
please help... ...me learn C++ please please please :) KK C++ 2 10-14-2003 02:08 PM



Advertisments