country1 has asked for the wisdom of the Perl Monks concerning the following question:
File A
CSFDATVM01,,2.55,3.77
I am using the following SPLIT function to read the
CSV file containing this line along with other lines
that do not have missing values.
my ($server, @data) = split /,/;
For this particular line in the CSV file, if I
print $data[0], perl will print a blank ' '.
How would I go about converting this blank to
the value '0'?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CSV Files With Missing Values
by Tux (Canon) on Jul 23, 2007 at 12:21 UTC | |
|
Re: CSV Files With Missing Values
by oxone (Friar) on Jul 23, 2007 at 12:25 UTC | |
|
Re: CSV Files With Missing Values
by Tux (Canon) on Jul 23, 2007 at 12:30 UTC | |
by Zen (Deacon) on Jul 23, 2007 at 14:09 UTC | |
by Tux (Canon) on Jul 23, 2007 at 14:19 UTC | |
by Zen (Deacon) on Jul 23, 2007 at 14:29 UTC | |
by ww (Archbishop) on Jul 23, 2007 at 15:59 UTC | |
| |
|
Re: CSV Files With Missing Values
by Argel (Prior) on Jul 23, 2007 at 20:05 UTC | |
|
Re: CSV Files With Missing Values
by mjscott2702 (Pilgrim) on Jul 23, 2007 at 19:31 UTC |