>
> I think I better see the context at this point.
> note, as I presume you did
The issue is resolved, but for the die hards here goes...
I'm wanted to figure out my method of attack before I did the whole
thing but here is an example that will illustrate the basic idea hopefully:
#!/usr/bin/p
On Jan 8, 2004, at 10:38 AM, Dan Muey wrote:
[..]
The vars to be assigned ($var1, $var2,etc...) come from a
database query so they are handled already earlier. So how
they are declared are irrelevant to the issue. (Yes they must be
initialized for a warnings safe environment and they are, just
assu
> On Jan 8, 2004, at 7:45 AM, Dan Muey wrote:
> [..]
> >
> > Except I need to do this to about ten variabels all in a row. Which
> > gives me 10 lines with Bob's way and 40 with my very first example.
> > Boo for that! :)
> >
> [..]
>
> Have you thought about a simplification process?
> One of t
On Jan 8, 2004, at 7:45 AM, Dan Muey wrote:
[..]
Except I need to do this to about ten variabels all in a row.
Which gives me 10 lines with Bob's way and 40 with my very
first example. Boo for that! :)
[..]
Have you thought about a simplification process?
One of the tricks I do is say
my ($var1,$
> Dan Muey wrote:
>
> > BTW - I'm not really using these variable names, only using
> them here
> > ot help clarify my goal.
>
> Why not? They looked very good to me, at least in the
> context of the question at hand. One of the best aspects of
In context yes, but the really really long w
> Dan Muey wrote:
>
> > Howdy list.
> > I'm trying to one lineify this:
> >
> > my $guts = $firstchoice || '';
> > if(!$guts && $use_second_choice_if_first_is_empty) {
> > $guts = $secondchoice;
> > }
> >
> > Basically
> > my $guts = $firstchoice || $secondchoic || '';
> > Would be perfect
Dan Muey wrote:
> BTW - I'm not really using these variable names, only using them here ot help
> clarify my goal.
Why not? They looked very good to me, at least in the context of the question at
hand. One of the
best aspects of Perl, IMHO, is that it allows you to just say what you mean. I
Dan Muey wrote:
> Howdy list.
> I'm trying to one lineify this:
>
> my $guts = $firstchoice || '';
> if(!$guts && $use_second_choice_if_first_is_empty) {
> $guts = $secondchoice;
> }
>
> Basically
> my $guts = $firstchoice || $secondchoic || '';
> Would be perfect except I only want to let
> > Howdy list.
> > I'm trying to one lineify this:
> >
> > my $guts = $firstchoice || '';
> > if(!$guts && $use_second_choice_if_first_is_empty) {
> > $guts = $secondchoice;
> > }
> >
> > Basically
> > my $guts = $firstchoice || $secondchoic || '';
> > Would be perfect except I only want t
> Dan Muey wrote:
> > Howdy list.
> > I'm trying to one lineify this:
> >
> > my $guts = $firstchoice || '';
> > if(!$guts && $use_second_choice_if_first_is_empty) {$guts =
> > $secondchoice; }
> >
> > Basically
> > my $guts = $firstchoice || $secondchoic || '';
> > Would be perfect excep
> > Howdy list.
> > I'm trying to one lineify this:
> >
> > my $guts = $firstchoice || '';
> > if(!$guts && $use_second_choice_if_first_is_empty) {
> > $guts = $secondchoice;
> > }
> >
> > Basically
> > my $guts = $firstchoice || $secondchoic || '';
> > Would be perfect except I only want t
>
> On Jan 7, 2004, at 2:20 PM, Dan Muey wrote:
>
> >
> > Is that possible to do with one line?
>
> technically no, because you needed
> my ($firstchoice, $use_second_choice_if_first_is_empty);
> my $secondchoice = 's2';
Sorry, I figured we could assume they were
declared earlier so as not to
On Jan 7, 2004, at 2:20 PM, Dan Muey wrote:
Is that possible to do with one line?
technically no, because you needed
my ($firstchoice, $use_second_choice_if_first_is_empty);
my $secondchoice = 's2';
then you can do
my $guts = ($use_second_choice_if_first_is_empty)? $secondchoice :
$firstchoice |
> Howdy list.
> I'm trying to one lineify this:
>
> my $guts = $firstchoice || '';
> if(!$guts && $use_second_choice_if_first_is_empty) {
> $guts = $secondchoice;
> }
>
> Basically
> my $guts = $firstchoice || $secondchoic || '';
> Would be perfect except I only want to let it use $se
Dan Muey wrote:
> Howdy list.
> I'm trying to one lineify this:
>
> my $guts = $firstchoice || '';
> if(!$guts && $use_second_choice_if_first_is_empty) { $guts =
> $secondchoice; }
>
> Basically
> my $guts = $firstchoice || $secondchoic || '';
> Would be perfect except I only want to let it use
15 matches
Mail list logo