Mailing List ArchiveSupport open source code!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: tlug: Easy (?) perl syntax question
- To: tlug@example.com
- Subject: Re: tlug: Easy (?) perl syntax question
- From: urs roesch <urs@example.com>
- Date: Mon, 26 Oct 1998 01:29:14 +0900
- Content-Transfer-Encoding: 7bit
- Content-Type: text/plain; charset=iso-2022-jp
- Organization: digital mines
- References: <3.0.6.32.19981025184317.00972650@example.com> <3.0.6.32.19981025231415.0096e9a0@example.com>
- Reply-To: tlug@example.com
- Sender: owner-tlug@example.com
Darren Cook wrote: > >> if($data{'formnum'} eq "1")$formnum="1"; > >Hmm let's see this should do it.... > >... > >or > > if ($data{'formnum'} eq "1"){ $formnum = "1" } > Okay, I see - I need {}. I'm thinking like a C programmer :-). i c > >Where do you get the value for $extension? Are you overwriting the > >$extension somewhere in the script? > $extension is fine - I'm fairly sure it's $formnum that is the problem. > When I did this: > $formnum=""; > if($data{'formnum'} eq "1"){$formnum="_1"} > ... > print "<!--$data{'formnum'}-->\n"; put a space between variable and minus because if you don't perl thinks you want to do something like $i--; I know you put the number between quotation marks but even if you do that perl will convert to an int, try this example: $i = "2"; # initializing 2 as a string $i--; # being converted to a number & subtracting 1 print $i # prints 1 perl will convert your string to an int! > print "<!--$formnum-->\n"; > print "<!--$wfile-->\n"; > Then in the HTML I see: > <!--1> > <!----> > <!--19981025.csv--> > The 1 has somehow removed the "--" characters. Also the if does not seem to > have worked. see above... > Now I change my to: > $formnum=$data{'formnum'}; > And in the HTML I see: > <!--1> > <!--1> > <!--199810251> > ^^^ It's put the 1 there, but removed everything that > followed: ".csv--" put the spaces between the HTML comments and the variable in and run the script again... urs -- u r s r o e s c h h a c h i o j i, t o k y o ---------------------------------------------------------- e# urs@example.com aim# uru uru 71 w# http://www.digital-mines.com icq# 13780972 --------------------------------------------------------------- Next Nomikai: 20 November, 19:30 Tengu TokyoEkiMae 03-3275-3691 Next Technical Meeting: January, 1999 (details TBA) --------------------------------------------------------------- Sponsor: PHT, makers of TurboLinux http://www.pht.co.jp
- Follow-Ups:
- Re: tlug: Easy (?) perl syntax question
- From: Darren Cook <darren@example.com>
- References:
- tlug: Easy (?) perl syntax question
- From: Darren Cook <darren@example.com>
- Re: tlug: Easy (?) perl syntax question
- From: Darren Cook <darren@example.com>
Home | Main Index | Thread Index
- Prev by Date: Re: tlug: Easy (?) perl syntax question
- Next by Date: Re: tlug: partition
- Prev by thread: Re: tlug: Easy (?) perl syntax question
- Next by thread: Re: tlug: Easy (?) perl syntax question
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links