On Mon, Dec 13, 2010 at 1:05 AM, John W. Krahn wrote:
> shawn wilson wrote:
>>
>> i'm trying to exclude undefined variables for that are to be put into
>> a sql database date field, but none of this is working:
>>
>> sub correctdate { # make valid
shawn wilson wrote:
i'm trying to exclude undefined variables for that are to be put into
a sql database date field, but none of this is working:
sub correctdate { # make valid sql DATE field
my $date = $_[ 0 ];
my ($month, $day, $year) = split / /, $date if defined(
You are declaring $corrected within the if block -- After it ends, the
variable goes out of scope, making a strict[0] Perl blow up in your face. As
you have warnings enabled, it shows that message (which you can look up in
perldiag is you don't quite get [1]).
The solution is simple: You just need
On Sun, Dec 12, 2010 at 8:11 PM, shawn wilson wrote:
> i'm trying to exclude undefined variables for that are to be put into
> a sql database date field, but none of this is working:
errr, sorry, my error with the current code is:
Global symbol "$corrected" requires exp
i'm trying to exclude undefined variables for that are to be put into
a sql database date field, but none of this is working:
sub correctdate { # make valid sql DATE field
my $date = $_[ 0 ];
my ($month, $day, $year) = split / /, $date if defined( $date );
$day =~ s/,/
--- Bryan Harris <[EMAIL PROTECTED]> wrote:
> Wild, I had no idea perl supported all these notations...
LOL!!! There are more
TMTOWTDI: There's More Than One Way To Do It.
> >> I'd like to concatenate two variables--
> >> $newVar = $old1 . $old2;
> >> -- where $old1 might be undefined. Is t
--- Bryan Harris <[EMAIL PROTECTED]> wrote:
> >> I'd like to concatenate two variables--
> >> $newVar = $old1 . $old2;
> >> -- where $old1 might be undefined. Is there any way to set a flag
> >> so that this just results in $old2 instead of the compiler
throwing
> >> an error?
> >
> > The concate
Rob Dixon wrote:
> Bryan Harris wrote:
> > > > I'd like to concatenate two variables--
> > > >
> > > > $newVar = $old1 . $old2;
> > > >
> > > > -- where $old1 might be undefined. Is there any way to set a
> > > > flag so that this just results in $old2 instead of the compiler
> > > > throwing an e
Bryan Harris wrote:
> > > I'd like to concatenate two variables--
> > >
> > > $newVar = $old1 . $old2;
> > >
> > > -- where $old1 might be undefined. Is there any way to set a
> > > flag so that this just results in $old2 instead of the compiler
> > > throwing an error?
> >
> > The concatenation o
From: Bryan Harris <[EMAIL PROTECTED]>
> I'd like to concatenate two variables--
>
> $newVar = $old1 . $old2;
>
> -- where $old1 might be undefined. Is there any way to set a flag so
> that this just results in $old2 instead of the compiler throwing an
> error?
It's not an error, but a warning.
>> I'd like to concatenate two variables--
>>
>> $newVar = $old1 . $old2;
>>
>> -- where $old1 might be undefined. Is there any way to set a flag so
>> that this just results in $old2 instead of the compiler throwing an
>> error?
>
> The concatenation operator will work fine with an undefined
Bryan Harris wrote:
> I'd like to concatenate two variables--
>
> $newVar = $old1 . $old2;
>
> -- where $old1 might be undefined. Is there any way to set a flag so
> that this just results in $old2 instead of the compiler throwing an
> error?
The concatenation operator will work fine with an unde
I'd like to concatenate two variables--
$newVar = $old1 . $old2;
-- where $old1 might be undefined. Is there any way to set a flag so that
this just results in $old2 instead of the compiler throwing an error?
(This is a gross simplification of the problem, I'd rather not check to see
if it's
13 matches
Mail list logo