[prev in list] [next in list] [prev in thread] [next in thread]
List: cgi-list
Subject: Re: [CGI] $pushitem=push(@temp_array,"$url|"); Problems
From: Eric Bridger <eric () NECX ! COM>
Date: 1997-07-31 4:21:43
[Download RAW message or body]
Your problem is the perl list separator, $" default is a space.
As usual there are a number of ways to deal with it:
1.# remove double quotes so a list context isn't assumed.
print LINKDATA @temp_array;
2.# Set the list separator to null, keep double quotes.
$" = "";
print LINKDATA "@temp_array";
3.# loop
foreach @temp_array {print};
=-=-
Eric Bridger
http://www.necx.com/
Kelly Biernaskie <kelly@csgm.com> wrote:
>
>$pushitem=push(@temp_array,"$url|");
>$pushitem=push(@temp_array,"$url_description|");
>
> And here's the code I use to write to the temp file.....
>
>sub delete_final{
>open (LINKDATA, ">/usr/local/etc/httpd/cgi-bin/kelly/temp.dat");
>print LINKDATA "@temp_array";
>close (LINKDATA);
>}
>
>Any idea's on how I can take those spaces out of the data file????
------------------------------------------------------------------------------
To unsubscribe from the CGI Digest, mailto:majordomo@jann.com with
the words "UNSUBSCRIBE cgi-list" in the message body.
SUPPORT YOUR NEW LIST, POST TO IT at mailto:cgi-list@JANN.COM
To contact a person at the CGI list, mailto:owner-cgi-list@jann.com
cgi-list is hosted by Wizards of the Web (http://wizweb.com).
------------------------------------------------------------------------------
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic