> "SB" == Steve Bertrand writes:
SB> Uri Guttman wrote:
>>> "t" == trapd00r writes:
>>
t> I would like to have someone looking over my script, which is a
t> basic frontend for playing radio with mplayer. In particular, I'm
t> wondering how I could get rid of all those elsif
Uri Guttman wrote:
>> "t" == trapd00r writes:
>
> t> I would like to have someone looking over my script, which is a
> t> basic frontend for playing radio with mplayer. In particular, I'm
> t> wondering how I could get rid of all those elsif's when parsing the
> t> arguments; as you
> "t" == trapd00r writes:
t> I would like to have someone looking over my script, which is a
t> basic frontend for playing radio with mplayer. In particular, I'm
t> wondering how I could get rid of all those elsif's when parsing the
t> arguments; as you can see, there's lots of them,
Hello,
I would like to have someone looking over my script, which is a basic
frontend for playing radio with mplayer. In particular, I'm wondering how I
could get rid of all those elsif's when parsing the arguments; as you can
see, there's lots of them, and I suspect that there's a better way of
John W. Krahn:
Jeff Pang wrote:
Noah:
sub exiting {
my ($hostname, %login) = @_;
Passing arguments like this has no such problem.
But you'd better pass the hash as a reference to the subroutine.
exitint($hostname, \%login);
sub exiting {
my $hostname = shift;
my %login = %{+shi
Jeff Pang wrote:
Noah:
sub exiting {
my ($hostname, %login) = @_;
Passing arguments like this has no such problem.
But you'd better pass the hash as a reference to the subroutine.
exitint($hostname, \%login);
sub exiting {
my $hostname = shift;
my %login = %{+shift};
What is t
Jeff Pang wrote:
> Noah:
>
>>
>> sub exiting {
>> my ($hostname, %login) = @_;
>
> Passing arguments like this has no such problem.
> But you'd better pass the hash as a reference to the subroutine.
...or bundle _all_ parameters into a hashref, which I've found to be
oh so extensible, wi
Noah:
sub exiting {
my ($hostname, %login) = @_;
Passing arguments like this has no such problem.
But you'd better pass the hash as a reference to the subroutine.
exitint($hostname, \%login);
sub exiting {
my $hostname = shift;
my %login = %{+shift};
...
}
print "logi
On 12/8/09 Tue Dec 8, 2009 5:41 PM, "Noah"
scribbled:
>
> Hi there List people,
>
> I am hoping to send a hash and a scalar to a subroutine but the variable
> is not completely being sent. Below is the error message below is
> showing something is not getting passed that well to the subrouti
Hi there List people,
I am hoping to send a hash and a scalar to a subroutine but the variable
is not completely being sent. Below is the error message below is
showing something is not getting passed that well to the subroutine.
Looks like %login is empty.
--- snip ---
$ret{$hostnames[0]
Steve Bertrand wrote:
> Hi all,
>
> I'm trying to customize a Makefile.PL with a custom install target.
>
> What I'd like is to have a 'make install', but have it ONLY install the
> .pm files. It's becoming a pain to have to install everything with every
> small change ;)
>
> I don't quite under
On 12/8/09 3:56 PM, Tony Esposito wrote:
Hello,
I am using Perl 5.8 on WindowsXP and Windows Server 2003. I can not get the
following attachment to arrive/attach even though I get the email with no
issues. Any ideas?
use MIME::Lite;
use Net::SMTP;
unless (-e 'C:/my_file.log'&& -s '
On 12/8/09 3:56 PM, Tony Esposito wrote:
Hello,
I am using Perl 5.8 on WindowsXP and Windows Server 2003. I can not get the
following attachment to arrive/attach even though I get the email with no
issues. Any ideas?
use MIME::Lite;
use Net::SMTP;
unless (-e 'C:/my_file.log'&& -s '
Hi all,
I'm trying to customize a Makefile.PL with a custom install target.
What I'd like is to have a 'make install', but have it ONLY install the
.pm files. It's becoming a pain to have to install everything with every
small change ;)
I don't quite understand how I can override the install tar
Hello,
I am using Perl 5.8 on WindowsXP and Windows Server 2003. I can not get the
following attachment to arrive/attach even though I get the email with no
issues. Any ideas?
use MIME::Lite;
use Net::SMTP;
unless (-e 'C:/my_file.log' && -s 'C:/my_file.log' ) { print "file not
found\n"
pa...@arcor.de wrote:
> Well, the OP said the method name is changing during the running time, so he
> want to eval the method name.
> So a AUTOLOAD method is right for him as far as I can think.
AUTOLOAD introduces the possibility of code injection. So does eval.
If the code is running on a ser
- Original Nachricht
Von: Shlomi Fish
An: beginners@perl.org
Datum: 08.12.2009 12:08
Betreff: Re: Eval scoping question
> On Tuesday 08 Dec 2009 12:18:10 Jeff Pang wrote:
> > Shlomi Fish:
> > > On Tuesday 08 Dec 2009 11:46:59 Jeff Pang wrote:
> > >> Shlomi Fish:
> > >>> Re
On Tuesday 08 Dec 2009 12:18:10 Jeff Pang wrote:
> Shlomi Fish:
> > On Tuesday 08 Dec 2009 11:46:59 Jeff Pang wrote:
> >> Shlomi Fish:
> >>> Regarding using string eval "" - you can do the same using
> >>> UNIVERSAL::can, which would be safer in this case:
> >>>
> >>>
> >>> __PACKAGE__->can("a
Thanks Dermot and erez.schatz
I got it ~
On Tue, Dec 8, 2009 at 4:59 PM, Erez Schatz wrote:
> 2009/12/8 Majian :
> > my $s = "The black cat jumped from the green tree";
> > print index $s, "e", 3 The result is 18
>
> It's slightly confusing, but if you get the idea behind it, it's
> actuall
Shlomi Fish:
On Tuesday 08 Dec 2009 11:46:59 Jeff Pang wrote:
Shlomi Fish:
Regarding using string eval "" - you can do the same using
UNIVERSAL::can, which would be safer in this case:
__PACKAGE__->can("asub")->(@params);
or define a package and use AUTOLOAD method?
How will the AUTOL
On Tuesday 08 Dec 2009 11:46:59 Jeff Pang wrote:
> Shlomi Fish:
> > Regarding using string eval "" - you can do the same using
> > UNIVERSAL::can, which would be safer in this case:
> >
> >
> > __PACKAGE__->can("asub")->(@params);
>
> or define a package and use AUTOLOAD method?
>
How will
Shlomi Fish:
Regarding using string eval "" - you can do the same using UNIVERSAL::can,
which would be safer in this case:
__PACKAGE__->can("asub")->(@params);
or define a package and use AUTOLOAD method?
--
Jeff Pang
http://home.arcor.de/pangj/
--
To unsubscribe, e-mail: beginner
2009/12/8 Anders Hartman :
>>> Hello,
>>> I which to use eval to execute subroutines dynamically.
>>> The following code snippet fails:
>>>
>>> #!/usr/bin/perl
>>>
>>> use strict;
>>> use warnings;
>>>
>>> sub asub {
>>> our $abc;
>>> print $abc;
>>> }
>>>
>>> my $abc = "abc\n";
>>> eval "asub";
On Tuesday 08 Dec 2009 11:03:44 Anders Hartman wrote:
> Jeff Pang skrev:
> > Anders Hartman:
> >> Hello,
> >>
> >> I which to use eval to execute subroutines dynamically.
> >>
> >> The following code snippet fails:
> >>
> >>
> >> #!/usr/bin/perl
> >>
> >> use strict;
> >> use warnings;
> >>
> >> su
Jeff Pang skrev:
Anders Hartman:
Hello,
I which to use eval to execute subroutines dynamically.
The following code snippet fails:
#!/usr/bin/perl
use strict;
use warnings;
sub asub {
our $abc;
print $abc;
}
my $abc = "abc\n";
eval "asub";
exit 0;
I don't think you want an eval here
2009/12/8 Majian :
> my $s = "The black cat jumped from the green tree";
> print index $s, "e", 3 The result is 18
It's slightly confusing, but if you get the idea behind it, it's
actually very simple:
counting from 0, the string "The black cat jumped from the green tree"
has an 'e' at the 2
Anders Hartman:
Hello,
I which to use eval to execute subroutines dynamically.
The following code snippet fails:
#!/usr/bin/perl
use strict;
use warnings;
sub asub {
our $abc;
print $abc;
}
my $abc = "abc\n";
eval "asub";
exit 0;
I don't think you want an eval here.
use strict;
use
Hello,
I which to use eval to execute subroutines dynamically.
The following code snippet fails:
#!/usr/bin/perl
use strict;
use warnings;
sub asub {
our $abc;
print $abc;
}
my $abc = "abc\n";
eval "asub";
exit 0;
with the error:
Use of uninitialized value in print at ...
asub shoul
Hi,all :
I have a problem about the perl index function , the problem is the
following :
#!/usr/bin/perl
use strict ;
my $s = "The black cat jumped from the green tree";
print index $s, "e", 3 The result is 18
I don't understand the result clearly ,Could someone help me to explain
29 matches
Mail list logo