CGI PERL problem..please help 
Author Message
 CGI PERL problem..please help

Methinks I just need another set of eyes to figure out what's wrong with
this snippet of code.  And unfortunatly no on else here speaks perl.

What I'm trying to do is take $in{'length'} and pad it with "0"'s to match
a part number in a catalog:

User gives 28 it should stip out 028
User gives 2 it should spit out 002
User gives 144 it should spit out 144

And I'm prety darn sure that I'm extremely close to doing this right but
something keeps going wrong.  Here's my code snipped

 while ($#tmp < 2) {

         }
foreach $i (0..$#tmp) {print '$tmp[$i]=',$tmp[$i],"<BR>\n"}; }


Now the foreach prints what I expect.  If I give $in{'length'} 28 then I

But if I print out $in('length'} after the join I get 01218
So what am I doing wrong?

Thanks a lot for anyone who can help!

----
Jason Hitesman

http://www.*-*-*.com/



Tue, 15 Dec 1998 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Problem with Perl CGI please help

2. Socket problem in perl CGI program, help please

3. Please Help with this Perl CGI Problem

4. CGI.pm file upload problem - Please Help!

5. Help Please: CGI-String terminator problem

6. CGI.pm file upload problem - Please Help!

7. PLease Help CGI configuration problem

8. PLEASE HELP - Problem with CGI script

9. Help Please: CGI-String terminator problem

10. Help Please: CGI-String terminator problem

11. symlink directory in apache perl .cgi script --- please help

 

 
Powered by phpBB® Forum Software