Chris Knipe wrote:
Hi,
Hello,
I was just wondering, when we talk about integers specifically,
Why integers specifically? The same applies for any scalar value.
what's the difference between:
my $foo = 1;
my $bar = 1;
and
my ($foo, $bar) = 1
I am getting more and more occurances where
Chris Knipe wrote:
> Hi,
>
> I was just wondering, when we talk about integers specifically, what's the
> difference between:
> my $foo = 1;
> my $bar = 1;
>
> and
>
> my ($foo, $bar) = 1
>
> I am getting more and more occurances where when I use the later as above,
> $bar would not have a defi
On Friday 19 Mar 2010 13:45:31 trapd...@trapd00r.se wrote:
> On 19/03/10 13:19 +0200, Chris Knipe wrote:
> >my ($foo, $bar) = 1
> >
> >I am getting more and more occurances where when I use the later as above,
> >$bar would not have a defined value... I'm not quite sure I understand
> >why.
>
> D
On 19 March 2010 11:45, wrote:
> On 19/03/10 13:19 +0200, Chris Knipe wrote:
>>
>> my ($foo, $bar) = 1
>>
>> I am getting more and more occurances where when I use the later as above,
>> $bar would not have a defined value... I'm not quite sure I understand
>> why.
>
> Does;
> my ($foo,$bar) = 1
On 19/03/10 13:19 +0200, Chris Knipe wrote:
my ($foo, $bar) = 1
I am getting more and more occurances where when I use the later as above,
$bar would not have a defined value... I'm not quite sure I understand why.
Does;
my ($foo,$bar) = 1 x 2;
do what you want?
--
To unsubscribe, e-mail: be
<[EMAIL PROTECTED]>
Subject: Re: Quick question on code factoring
On Mon, Sep 11, 2006 at 08:28:15PM -0400, Jen Spinney wrote:
>
> Chad -
>
> Thanks for the quick reply. How do I embed the "unless" inside
> function call parentheses?
>
> I've muddled arou
On Mon, Sep 11, 2006 at 05:37:15PM -0700, chen li wrote:
>
> What is the usage for "? () :" and where can I find
> more about it?
perldoc perlop
--
CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
This sig for rent: a Signify v1.14 production from http://www.debian.org/
--
To unsubscrib
> > It looks like you may want something like this:
> >
> >
> > $id = $c->createLine(
> > $x[0], $time1,
> > $x[1], $time1,
> > $color eq $B_COLOR ? () : (
> > $x[2], $time2,
> > $x[3], $time2,
> > ),
> > -arrow => 'last'
On 9/11/06, John W. Krahn <[EMAIL PROTECTED]> wrote:
Jen Spinney wrote:
> Hello. It's obvious that I need to factor the follow code, but I'm
> not sure how to go about it syntax wise (I read perldoc perlsyn, but
> I'm still not sure of the best way).
>
>if ($color eq $B_COLOR)
>{
> $
On 9/11/06, Chad Perrin <[EMAIL PROTECTED]> wrote:
On Mon, Sep 11, 2006 at 08:02:36PM -0400, Jen Spinney wrote:
>
> The only difference between the blocks is two additional lines
> ($x[2]...) in the else block. I mean, I know I could write a
> subroutine that I could call inside the parentheses
Jen Spinney wrote:
> Hello. It's obvious that I need to factor the follow code, but I'm
> not sure how to go about it syntax wise (I read perldoc perlsyn, but
> I'm still not sure of the best way).
>
>if ($color eq $B_COLOR)
>{
> $id = $c->createLine
> ($x[0], $time1,
>
On Mon, Sep 11, 2006 at 08:02:36PM -0400, Jen Spinney wrote:
>
> The only difference between the blocks is two additional lines
> ($x[2]...) in the else block. I mean, I know I could write a
> subroutine that I could call inside the parentheses that would return
> a string (either empty or contai
Hi John.
I may be misunderstanding you, but this doesn't look right to me.
John W. Krahn wrote:
> Jeroen Lodewijks wrote:
> >
> > 1)
> >
> > sub PassHash
> > {
> > my (%hash) = @_;
> >
> > $hash{$some_key} = 'test';
> >...
> > }
> >
> > PassHash(%hash);
> >
> > What happens internally
Jeroen Lodewijks wrote:
>
> Hi all,
Hello,
> I have a 2 questions about the internal representation of a hash or array.
> Consider this piece of code:
>
> 1)
>
> sub PassHash
> {
> my (%hash) = @_;
>
> $hash{$some_key} = 'test';
>...
> }
>
> PassHash(%hash);
>
> What happens int
I sink the are copied in boat places
for the first teste this code
use Data::Dumper;
sub PassHash
{
my (%new_hash) = @_;
$new_hash{a} = 3;
}
my %hash = (a=>1, b=>2);
PassHash(%hash);
print Dumper(\%hash);
::
On Friday, July 5, 2002, at 05:58 , Timothy Johnson wrote:
> Yeah, that would work, unless you want to notify more than one person.
> Then
> it gets a little more complicated. Using the example you gave, it would
> be
> fairly easy to create a script that notified your contact. Something li
On Friday, July 5, 2002, at 05:27 , William Black wrote:
[..]
> So far All I've done is set up a hash as shown below: How can I use this
> hash and any built modules to accomplish my task. In addition, if there
> areany modules please include them.
>
>
> %contact_info{
> name => 'John S
some tweaking since I haven't actually tested it
yet.
-Original Message-
From: William Black [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 05, 2002 5:38 PM
To: [EMAIL PROTECTED]
Subject: RE: Quick question.
Thanks Timothy,
Other than the module, Do I have the right idea with the hash?
Modules :
Net::SMTP
Mail::Sender
If you are using Linux like OS , and have sendmail
$| = 1;
open (FH, "| sendmail -t")
# I forget what should be added on the above to protect /pwd/
print FH "Content";
close (FH);
Rgds,
Connie
- Original Message -
From: "William Black" <[EMAIL PROTEC
You'll need access to an SMTP server. The first module I would recommend is
Net::SMTP, but if you're not all that familiar with Net::SMTP, then I would
recommend going to http://search.cpan.org and doing a search on mail, smtp,
etc.
-Original Message-
From: William Black [mailto:[EMAIL
$date =~ /(\d{2})(\d{2})(\d{4})/;
my($month,$day,$year) = ($1,$2,$3);
-Original Message-
From: William J Black [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 03, 2002 12:00 PM
To: [EMAIL PROTECTED]
Subject: RE: Quick Question
Hi all,
If I have a string, for examle: $date
> If I have a string, for examle: $date = "06072002";
> How could I separate this in to three separate vars so that $mon=06,
> $day=07 and $year=2002.
What do you have? You have two digits, and two digits, and four digits.
In regex talk, that looks like this:
/(\d\d)(\d\d)(\d\d\d\d)/
or
/(\d{2
Hi all,
If I have a string, for examle: $date = "06072002";
How could I separate this in to three separate vars so that $mon=06,
$day=07 and $year=2002.
thanks,
William Black - Duke Energy
IM - Systems Mgmt Tools Support
401 S. College St., Charlotte NC
(704) 382-3787 Voice
--
To unsubscri
Hi all,
If I have a string, for examle: $date = "06072002";
How could I separate this in to three separate vars so that $mon=06,
$day=07 and $year=2002.
thanks,
William Black
Duke Energy
IM - Systems Mgmt Tools Support
401 S. College St., Charlotte NC
(704) 382-3787 Voice
--
To unsubscribe,
> I have an array of directory files and I want to search via the date the
> directory was created. Is there a function or dash option that handles
> this?
Yes, they're the unary file operators:
http://www.perldoc.com/perl5.6.1/pod/func/X.html
xoxo,
Andy
--
'Andy Lester[EMAIL PROTEC
ck [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 01, 2002 11:46 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Quick Question
>
>
> Hi All,
>
> I have an array of directory files and I want to search via
> the date the
> directory was created. Is there a function or
Hi All,
I have an array of directory files and I want to search via the date the
directory was created. Is there a function or dash option that handles
this?
Thanks,
William Black
Duke Energy
401 S. College St.
Charlotte NC
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional comman
James Poni wrote:
>
> Hello again (final time)
>
> I also want to sort the (number time) field when we have the same day
> eg:
>
> below:
> ccc gamma sun 3:00
> aaa aplha mon 1:00 < eee epsilon mon 3:00 < zzz zeta mon 4:00 << is sorted if the same day
> ddd delta tue 1:00 <<
> iii ita
I modified your sort to be like:
@info = sort { $days{$a->[1]} <=> $days{$b->[1]} || $a->[2] =~ /^\d+/ <=>
$b->[2] =~ /^\d+/ || $a->[2] =~ /:\d+/ <=> $b->[2] =~ /:\d+/ } @info;
I then reversed all your data within the simple script and this is the
output:
ccc gamma sun 3:00
aaa alpha
additional comment, for the username can be any cases, what happen if you have
username Abc_123 ?? well, . try this too:
'[^@]+\@(cc\.)?owu\.edu$'
Jeff 'japhy' Pinyan wrote:
> On Oct 25, Jason LaMar said:
>
> >I'm trying to modify the ubiquitous FormMail CGI scripts so that Web form
> >r
On Oct 25, Jason LaMar said:
>I'm trying to modify the ubiquitous FormMail CGI scripts so that Web form
>results are sent ONLY to recipients on campus. Right now, there's a line to
>accomplish this for [EMAIL PROTECTED] e-mail addresses ...
>
>@validrecipients = ( '^[a-z]{1,}\@cc\.owu\.edu$' );
>
31 matches
Mail list logo