...
I just worked around by using warn/die again.
--
Manfred
On Tue, 31 Mar 2015 13:24:31 +0300
Shlomi Fish wrote:
> Hi Manfred,
>
> On Tue, 31 Mar 2015 10:28:13 +0200
> Manfred Lotz wrote:
>
> > Hi there,
> > I have a script where I use croak and somebody else using
On Tue, Mar 31, 2015 at 3:28 AM, Manfred Lotz wrote:
>
> Bizarre copy of HASH in list assignment
> at /usr/share/perl/5.20/Carp.pm line 228.
>
Hmm:
http://stackoverflow.com/questions/6217317/bizarre-copy-of-unknown-in-subroutine-entry
which suggests:
A "Bizarre copy" oc
Hi Manfred,
On Tue, 31 Mar 2015 10:28:13 +0200
Manfred Lotz wrote:
> Hi there,
> I have a script where I use croak and somebody else using that script
> gets
>
> Bizarre copy of HASH in list assignment
> at /usr/share/perl/5.20/Carp.pm line 228.
>
> I get a me
Hi there,
I have a script where I use croak and somebody else using that script
gets
Bizarre copy of HASH in list assignment
at /usr/share/perl/5.20/Carp.pm line 228.
I get a message like this, instead:
Variable b has empty value! at ./x.pl line 23.
main::myfunc() called at ./x.pl line
On Apr 20, 2:11 pm, dery...@gmail.com ("C.DeRykus") wrote:
> On Apr 20, 9:38 am, jimsgib...@gmail.com (Jim Gibson) wrote:
>
> ...
> > >> If we put $x=(1,2) then we get 2 without the error message.
>
> > >> Can someone please explain why?
>
> > > Yes, perl places the last item in the list into the v
srd wrote:
What really needs an explanation is if the array contains n elements
then (n-2) warnings are emitted.
maybe i was not so clear about my question
Paul Johnson wrote:
> On Tue, Apr 20, 2010 at 09:38:48AM -0700, Jim Gibson wrote:
>> Yes, but as srd has observed, you get one fewer warni
What really needs an explanation is if the array contains n elements
then (n-2) warnings are emitted.
maybe i was not so clear about my question
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
On Apr 20, 9:38 am, jimsgib...@gmail.com (Jim Gibson) wrote:
> On 4/20/10 Tue Apr 20, 2010 9:25 AM, "Shawn H Corey"
> scribbled:
>
> > srd wrote:
> >> #!/usr/bin/env perl
> >> use warnings;
> >> use strict;
> >> my $x= (1,2,3);
> >> print $x,"\n";
> >> exit(0);
> >> *
On Tue, Apr 20, 2010 at 09:38:48AM -0700, Jim Gibson wrote:
> On 4/20/10 Tue Apr 20, 2010 9:25 AM, "Shawn H Corey"
> scribbled:
>
> > srd wrote:
> >> #!/usr/bin/env perl
> >> use warnings;
> >> use strict;
> >> my $x= (1,2,3);
> >> print $x,"\n";
> >> exit(0);
> >> *
On 4/20/10 Tue Apr 20, 2010 9:25 AM, "Shawn H Corey"
scribbled:
> srd wrote:
>> #!/usr/bin/env perl
>> use warnings;
>> use strict;
>> my $x= (1,2,3);
>> print $x,"\n";
>> exit(0);
>> *
>> output:
>> Useless use of a constant in void context at ./try.plx line
srd wrote:
#!/usr/bin/env perl
use warnings;
use strict;
my $x= (1,2,3);
print $x,"\n";
exit(0);
*
output:
Useless use of a constant in void context at ./try.plx line 4.
3
*
If we put $x=(1,2) then we get 2 without the error
#!/usr/bin/env perl
use warnings;
use strict;
my $x= (1,2,3);
print $x,"\n";
exit(0);
*
output:
Useless use of a constant in void context at ./try.plx line 4.
3
*
If we put $x=(1,2) then we get 2 without the error message.
Can
Ed Avis schreef:
> Perl's list assignment feature is very useful.
>
> sub returns_three_things { return (1, 2, 3) }
> my ($x, $y, $z) = returns_three_things();
>
> Often, though, you want to add some error checking. Particularly
> when providing an inte
13 matches
Mail list logo