Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Adding empty value in an Array!

by davido (Cardinal)
on Mar 10, 2021 at 18:40 UTC ( [id://11129418]=note: print w/replies, xml ) Need Help??


in reply to Adding empty value in an Array!

I assume you are using Spreadsheet::ParseExcel. So I'll try to help with that assumption.

First, though; what is this line doing?

for my $col10 ( $col_min = 1) {

$col10 will only ever contain one value, the integer 1. And you aren't using $col10 ever. And the loop only happens once. It seems broken.

As for getting the value, it seems like this is what you want:

$cell0 = $cello->value; push @cello, length($cell0) ? $cell0 : $no2;

This will push into @cello either the value held in $cell0, or if there is no value (empty string, or undef), it will push in whatever is stored in $no2.

Your question, as asked, leaves a lot of questions unanswered. Imagine a kid asking his parent "How do I get there?" And the parent has to ask "Where?" and then has to follow up with "Where are you now?", and then "What mode of transportation?" You know more about this problem than we do. Please be sure when you ask, that you provide enough context so that we don't have to guess where you are coming from and where you are going.


Dave

Replies are listed 'Best First'.
Re^2: Adding empty value in an Array!
by chandantul (Scribe) on Mar 11, 2021 at 18:01 UTC

    Thanks for the response Dave. Yes I would like to replace the empty value with $no2 = "NO Email ID exist"

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11129418]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-03-29 07:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found