Hi Scott,
Scott Haneda wrote:
ASSP installed. I edit the ASSP source files to change the first line
from:
#!/usr/bin/perl --
to
#!/opt/local/bin/perl --
...
run as `perl testfile.pl` it will fail, with error that it can not find
email valid
run as `/opt/local/bin/perl testfile.pl` it wo
Hello, total newbie here, maybe 50 lines of perl in my life. I really
appreciate any pointers. I have hit a research wall on this one.
I am working on trying to create a portfile for MacPorts for ASSP.
MacPorts is just a package manager for OS X. There are a few things
that are probably
2009/1/23 ben perl :
> Hi Chas,
>
> Can you give me an example when one would be used over the other? So, is
> require used more for efficiency, so we load the module only if we need it?
> Thanks,
> -Ben
>
Many time we need 'require' not 'use'.
For example, given this .pm:
package mylib;
requir
On Thu, Jan 22, 2009 at 19:12, Rob Dixon wrote:
> Chas. Owens wrote:
>>
>> What is so hard about
>>
>> $string =~ s/^[ ]*(.*)[ ]*$/$1/;
>
> It's not hard, it just won't strip trailing spaces because your captured
> string
> has a greedy quantifier!
>
> I usually use
>
> s/^\s+//, s/\s+$// for $s
Chas. Owens wrote:
>
> What is so hard about
>
> $string =~ s/^[ ]*(.*)[ ]*$/$1/;
It's not hard, it just won't strip trailing spaces because your captured string
has a greedy quantifier!
I usually use
s/^\s+//, s/\s+$// for $string;
Rob
--
To unsubscribe, e-mail: beginners-unsubscr...@perl
On Thu, Jan 22, 2009 at 18:35, Owen wrote:
>> Hi Chas,
>>
>> Can you give me an example when one would be used over the other? So,
>> is
>> require used more for efficiency, so we load the module only if we
>> need it?
>> Thanks,
>> -Ben
>
>
> Bit of a conundrum there, if you don't need a module,
On Thu, Jan 22, 2009 at 18:01, ben perl wrote:
> Hi Chas,
> Can you give me an example when one would be used over the other? So, is
> require used more for efficiency, so we load the module only if we need it?
> Thanks,
snip
Efficiency is one reason (loading modules you won't use is wasteful),
b
> Hi Chas,
>
> Can you give me an example when one would be used over the other? So,
> is
> require used more for efficiency, so we load the module only if we
> need it?
> Thanks,
> -Ben
Bit of a conundrum there, if you don't need a module, why include it
in your program.
Anyway you might have y
Hi Chas,
Can you give me an example when one would be used over the other? So, is
require used more for efficiency, so we load the module only if we need it?
Thanks,
-Ben
On Thu, Jan 22, 2009 at 2:50 PM, Chas. Owens wrote:
> On Thu, Jan 22, 2009 at 17:33, ben perl wrote:
> > Hi Everyone,
> > I
On Thu, Jan 22, 2009 at 17:33, ben perl wrote:
> Hi Everyone,
> I am could never understand the difference between use vs require? If
> "require" is older way of including modules, why not just make it obsolete.
snip
Well, first off, because use uses require. The use looks something
like this in
Hi ben,
ben perl wrote:
Hi Everyone,
I am could never understand the difference between use vs require? If
"require" is older way of including modules, why not just make it obsolete.
nope there's even more than that.
"use" loads the source when starting the script.
"require" just loads it wh
Hi Everyone,
I am could never understand the difference between use vs require? If
"require" is older way of including modules, why not just make it obsolete.
Thanks,
-Bandeep
On Thu, 22 Jan 2009 06:21:32 -0800 (PST)
melbou...@gmail.com wrote:
> I have a Perl script that I run and the out come as showing below:
>
> Reading: server 1\08121100.mls
> Log chain 2:
> Reading: server 2\08120700.mls
> Reading: server 2\08120900.mls
> Reading: server 2\08121100.mls
> L
I have a Perl script that I run and the out come as showing below:
Reading: server 1\08121100.mls
Log chain 2:
Reading: server 2\08120700.mls
Reading: server 2\08120900.mls
Reading: server 2\08121100.mls
Log chain 3:
Reading: server 3\08120700.mls
Reading: server 3\08120900.mls
Readi
I have a Perl script that I run and the out come as showing below:
Reading: server 1\08121100.mls
Log chain 2:
Reading: server 2\08120700.mls
Reading: server 2\08120900.mls
Reading: server 2\08121100.mls
Log chain 3:
Reading: server 3\08120700.mls
Reading: server 3\08120900.mls
Readi
15 matches
Mail list logo