Help - Search - Member List - Calendar
Full Version: combinations
WorkTheWeb Forums > Webmaster Resources > Perl Beginner Help
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44
Support our Sponsors!
Casey West
It was Wednesday, November 12, 2003 when [Email Removed] took the soap box, saying:
: hum could we not get a nice topic prefix added to the list?
: it would make it a lot easy to make mail filters that could kill all mail
: going to this address, not from the list.?

No, we won't be doing that.

Use the headers. Perhaps Delivered-To could help.

Casey West

--
Shooting yourself in the foot with Linux
Generous programmers from around the world all join forces to help you
shoot yourself in the foot for free.

Dan Muey
QUOTE
I am using the following code and keep getting a message that
says "Can't use an undefined value as a hash reference."  I'm
completely lost trying to debug it because the line in
question is a }.  I was wondering if any guru could spot some

There are many references , what line number does it say
is evil and which line below is that?

DMuey

QUOTE
newbie idiocy in my code.  I am, of course, using strict and warnings.

Thanks in advance!

Dan

sub get_mysql_SQL {
my $self = shift (@_);
my $line = shift (@_);
my $debugger = $self->{debugger};
if ($self->{info_mode}) {
$debugger->warning("We've entered get_mysql_SQL");
}
if (not $line) { $debugger->fatal_error("There was no
line in the @_ array..."); }
my @temp = split ':', $line;
my $action = shift (@temp);
my $SQL = "";
if ($action =~ m/create/i) {
my $table_name = shift (@temp);
my @columns;
while ($_ = shift (@temp)) {
  my $temp3 = {
        name => $_,
        type => shift (@temp),
        options => [split (';', (shift (@temp)))]
      };
  push @columns, $temp3;
  $SQL .= "CREATE TABLE $table_namen";
  $SQL .= "(n";
  while (my %hash = %{ shift (@columns) }) {
    $SQL .= "  $hash{name} ";
    if ($hash{type} =~ m/INT/i) {
      $SQL .= "INT ";
    }
    elsif ($hash{type} =~ m/VARCHAR/i) {
      $SQL .= "VARCHAR(80) ";
    }
    elsif ($hash{type} =~ m/DATE/i) {
      $SQL .= "DATE ";
    }
    elsif ($hash{type} =~ m/LOB/i) {
      $SQL .= "BLOB ";
    }
    elsif ($hash{type} =~ m/TEXT/i) {
      $SQL .= "LONGTEXT ";
    }
    elsif ($hash{type} =~ m/BOOL/i) {
      $SQL .= "BIT ";
    }
    else {
      $debugger->fatal_error("Data Type: $hash{type} unknown.");
    }

    my @options = @{ $hash{options} };
    while ($_ = shift (@options)) {
      if ($_ =~ m/not null/i) {
  $SQL .= "NOT NULL ";
      }
      elsif ($_ =~ m/unique/i) {
  $SQL .= "UNIQUE ";
      }
      elsif ($_ =~ m/primary key/i) {
  $SQL .= "PRIMARY KEY";
      }
      elsif ($_ =~ m/auto increment/i) {
  $SQL .= "AUTO_INCREMENT ";
      }
      else {
  $debugger->error("Option: $_ is not known.
Assuming it's database specific and ignoring.");
      }
    }
    $SQL .= "n";
  }
}
$SQL .= ");nn";
return $SQL;
}
else {
$debugger->fatal_error("Action $action is unknown to
get_mysql_SQL.");
}
}


--
To unsubscribe, e-mail: [Email Removed]
For additional commands, e-mail: [Email Removed]



Dan Anderson
On Wed, 2003-11-12 at 18:30, Dan Muey wrote:
QUOTE
I am using the following code and keep getting a message that
says "Can't use an undefined value as a hash reference."  I'm
completely lost trying to debug it because the line in
question is a }.  I was wondering if any guru could spot some

There are many references , what line number does it say
is evil and which line below is that?

Thanks for your help, I have put a -----right here ----- in the code...

-Dan

sub get_mysql_SQL {
my $self = shift (@_);
my $line = shift (@_);
my $debugger = $self->{debugger};
if ($self->{info_mode}) {
$debugger->warning("We've entered get_mysql_SQL");
}
if (not $line) { $debugger->fatal_error("There was no
line in the @_ array..."); }
my @temp = split ':', $line;
my $action = shift (@temp);
my $SQL = "";
if ($action =~ m/create/i) {
my $table_name = shift (@temp);
my @columns;
while ($_ = shift (@temp)) {
my $temp3 = {
name => $_,
type => shift (@temp),
options => [split (';', (shift (@temp)))]
};
push @columns, $temp3;
$SQL .= "CREATE TABLE $table_namen";
$SQL .= "(n";
while (my %hash = %{ shift (@columns) }) {
$SQL .= " $hash{name} ";
if ($hash{type} =~ m/INT/i) {
$SQL .= "INT ";
}
elsif ($hash{type} =~ m/VARCHAR/i) {
$SQL .= "VARCHAR(80) ";
}
elsif ($hash{type} =~ m/DATE/i) {
$SQL .= "DATE ";
}
elsif ($hash{type} =~ m/LOB/i) {
$SQL .= "BLOB ";
}
elsif ($hash{type} =~ m/TEXT/i) {
$SQL .= "LONGTEXT ";
}
elsif ($hash{type} =~ m/BOOL/i) {
$SQL .= "BIT ";
}
else {
$debugger->fatal_error("Data Type: $hash{type} unknown.");
}

my @options = @{ $hash{options} };
while ($_ = shift (@options)) {
if ($_ =~ m/not null/i) {
$SQL .= "NOT NULL ";
}
elsif ($_ =~ m/unique/i) {
$SQL .= "UNIQUE ";
}
elsif ($_ =~ m/primary key/i) {
$SQL .= "PRIMARY KEY";
}
elsif ($_ =~ m/auto increment/i) {
$SQL .= "AUTO_INCREMENT ";
}
else {
$debugger->error("Option: $_ is not known.
Assuming it's database specific and ignoring.");
}
}
$SQL .= "n";
}
#---------right here------
}
$SQL .= ");nn";
return $SQL;
}
else {
$debugger->fatal_error("Action $action is unknown to
get_mysql_SQL.");
}
}

Drieux
On Wednesday, Nov 12, 2003, at 15:25 US/Pacific, Casey West wrote:

QUOTE
It was Wednesday, November 12, 2003 when [Email Removed] took the soap
box, saying:
: hum could we not get a nice topic prefix added to the list?
: it would make it a lot easy to make mail filters that could kill all
mail
: going to this address, not from the list.?

No, we won't be doing that.

Use the headers.  Perhaps Delivered-To could help.

Casey West

what I use is apple's Mail.app, and I have it looking for

[Email Removed]

in the to or cc line, and it puts it into an email folder
called PerlBeginners. I have a similar rule for things that
go to the cgi-perl-beginner mailing list, so at times when
folks 'cross post' it's a rule munch, but both of them will
wind up in only one of the folders.

I will confess that tracking on the

'Delivered-To' line

would be another strategy - but I noticed that there are
two of them in the email that I am responding to:

QUOTE
Delivered-To: mailing list [Email Removed]
Delivered-To: [Email Removed]


ciao
drieux

---

Trent Rigsbee
I think I figured it out! A FIRST!!

for ($i = 1; $i <= 5; $i++){
sleep 1;
print "$in";
}


I prints out like this: 1...2...3...4...5

YES!!

Thanks everyone! :-)



QUOTE
From: "Trent Rigsbee" <[Email Removed]
To: [Email Removed]
Subject: Counting  (easy!)
Date: Thu, 13 Nov 2003 01:05:37 +0000

I'm sure this is easy but I'm a newbie. I was doing control statements
(for, while,etc.) like this:

for ($count = 1; $count <= 5; $count++) {
print "$countn";
}

What I wanted to do was to make each number appear in sequence like you see
in a countdown (or up, in this case) instead of all on the screen at once.
I've tried using sleep but I'm not getting anywhere with it. Any ideas?
Also, any methods or ideas on how to approach creating code in general? For
example, what's the thought process for trying to do what I want to do?
I've tried pseudo code and it's helped some but then I hit the wall and
don't how to go further. Thanks!

_________________________________________________________________
Frustrated with dial-up? Get high-speed for as low as $26.95.
https://broadband.msn.com (Prices may vary by service area.)


--
To unsubscribe, e-mail: [Email Removed]
For additional commands, e-mail: [Email Removed]


_________________________________________________________________
Send a QuickGreet with MSN Messenger
http://www.msnmessenger-download.com/tracking/cdp_games

At 02:00 13/11/2003, you wrote:


QUOTE
On Wednesday, Nov 12, 2003, at 15:25 US/Pacific, Casey West wrote:

It was Wednesday, November 12, 2003 when [Email Removed] took the soap box, saying:
: hum could we not get a nice topic prefix added to the list?
: it would make it a lot easy to make mail filters that could kill all mail
: going to this address, not from the list.?

No, we won't be doing that.

Use the headers.  Perhaps Delivered-To could help.

Casey West

what I use is apple's Mail.app, and I have it looking for

[Email Removed]

in the to or cc line, and it puts it into an email folder
called PerlBeginners. I have a similar rule for things that
go to the cgi-perl-beginner mailing list, so at times when
folks 'cross post' it's a rule munch, but both of them will
wind up in only one of the folders.


yes i have a filter set up like this too, it was more the spam i was trying to filter out...
i spose i can just set up a filter after this one putting anything to this address in to spam folder
just means im in danger of filtering out any direct reply that is not cc'd to the list
that is why i thort the topic prefix would be nice

ill stop rambling now

QUOTE
I will confess that tracking on the

'Delivered-To' line

would be another strategy - but I noticed that there are
two of them in the email that I am responding to:

Delivered-To: mailing list [Email Removed]
Delivered-To: [Email Removed]


ciao
drieux

---


--
To unsubscribe, e-mail: [Email Removed]
For additional commands, e-mail: [Email Removed]




---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.537 / Virus Database: 332 - Release Date: 06/11/2003


Tim Johnson
Wouldn't that print out

1
2
3
4
5
?

-----Original Message-----
From: Trent Rigsbee [mailto:[Email Removed]]
Sent: Wednesday, November 12, 2003 6:13 PM
To: [Email Removed]
Subject: Re: Counting (easy!) (YES!!)

I think I figured it out! A FIRST!!

for ($i = 1; $i <= 5; $i++){
sleep 1;
print "$in";
}


I prints out like this: 1...2...3...4...5

YES!!

Thanks everyone! :-)



QUOTE
From: "Trent Rigsbee" <[Email Removed]
To: [Email Removed]
Subject: Counting  (easy!)
Date: Thu, 13 Nov 2003 01:05:37 +0000

I'm sure this is easy but I'm a newbie. I was doing control statements
(for, while,etc.) like this:

for ($count = 1; $count <= 5; $count++) {
print "$countn"; }

What I wanted to do was to make each number appear in sequence like you

see in a countdown (or up, in this case) instead of all on the screen
at once.
I've tried using sleep but I'm not getting anywhere with it. Any ideas?

Also, any methods or ideas on how to approach creating code in general?

For example, what's the thought process for trying to do what I want to
do?
I've tried pseudo code and it's helped some but then I hit the wall and

don't how to go further. Thanks!

_________________________________________________________________
Frustrated with dial-up? Get high-speed for as low as $26.95.
https://broadband.msn.com (Prices may vary by service area.)


--
To unsubscribe, e-mail: [Email Removed] For additional
commands, e-mail: [Email Removed]


_________________________________________________________________
Send a QuickGreet with MSN Messenger
http://www.msnmessenger-download.com/tracking/cdp_games


--
To unsubscribe, e-mail: [Email Removed]
For additional commands, e-mail: [Email Removed]

Charles K. Clarkson
Trent Rigsbee <[Email Removed]> wrote:
:
: I think I figured it out! A FIRST!!
:
: for ($i = 1; $i <= 5; $i++){
: sleep 1;
: print "$in";
: }

As you move into larger programs and scripts it
is a good idea to always use strict and warnings.

use strict;
use warnings;

After adding these to the top of your script
you'll need to use 'my' before using most variables
for the first time:

use strict;
use warnings;

for ( my $i; $i <= 5; $i++ ) {
sleep 1;
print "$in";
}


You can also use the range operator to save some
typing:

for my $i ( 1 .. 5 ) {
sleep 1;
print "$in";
}


HTH,

Charles K. Clarkson
--
Head Bottle Washer,
Clarkson Energy Homes, Inc.
Mobile Home Specialists


QUOTE
Just dont use mail

use a newsreader to use this group pointed at nntp.perl.org

Ram

Thanks what a excellent idea, all tho i fear it will not save me now.

Does any one know of a good news reader i can install on my web-site?
one written in Perl would be nice ;)


QUOTE

--
To unsubscribe, e-mail: [Email Removed]
For additional commands, e-mail: [Email Removed]


--


fnord
yes im a Concord Engineer, no it never flown!

Ramprasad A Padmanabhan
Just dont use mail

use a newsreader to use this group pointed at nntp.perl.org

Ram

Jeff 'Japhy' Pinyan
On Nov 13, James Edward Gray II said:

QUOTE
On Nov 13, 2003, at 9:50 AM, Bob Showalter wrote:

Mike Blezien wrote:
Hi,

Ran accross a function called "ceil" and from the information I got
on this:

"ceil() [Stands for ceiling], it just rounds a float value up.. so
ceil(4.7) == ceil(4.1342) == 5"

would this be the same as using "int" function in perl

No. int() simply drops the fractional part.

ceil() is often presented with a sister function called floor().  That
would be the same as Perl's int().

No, int() is neither exactly like ceil() or floor(). All int() does is
truncate the number to an integer. If you have 2.3, you get 2. If you
have 2.9, you get 2. If you have -2.3, you get -2. If you have -2.9, you
get -2. If you were to write int() as a function of ceil() and/or
floor(), you'd have to say:

sub int { my $x = shift; $x > 0 ? floor($x) : ceil($x); }

--
Jeff "japhy" Pinyan [Email Removed] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
<stu> what does y/// stand for? <tenderpuss> why, yansliterate of course.
[ I'm looking for programming work. If you like my work, let me know. ]

Bob Showalter
Christiane Nerz wrote:
QUOTE
Kevin Old wrote:
...
select undef, undef, undef, 0.25 or print $_
for 1 .. 5;
...
quite interesting chunk of code - but what the hell does select does
here? Yeah - I rtfm - but didn't understand it - maybe one could
explain it in more simple words?

It's used in this case for sleeping for less than one second. The sleep()
function only sleeps for a whole number of seconds.

Rob Dixon
"Bob Showalter" <[Email Removed]> wrote in message news:2E4528861499D41199D200A0C9B15BC001D7EBE7@FRISTX...
QUOTE
Christiane Nerz wrote:
Kevin Old wrote:
...
select undef, undef, undef, 0.25 or print $_
for 1 .. 5;
...
quite interesting chunk of code - but what the hell does select does
here? Yeah - I rtfm - but didn't understand it - maybe one could
explain it in more simple words?

It's used in this case for sleeping for less than one second. The sleep()
function only sleeps for a whole number of seconds.

Not exactly a transparent piece of code though is it. Especially
if your base system isn't Unix!

/R

Kevin Old
On Thu, 2003-11-13 at 09:33, Rob Dixon wrote:
QUOTE
"Bob Showalter" <[Email Removed]> wrote in message news:2E4528861499D41199D200A0C9B15BC001D7EBE7@FRISTX...
Christiane Nerz wrote:
Kevin Old wrote:
...
select undef, undef, undef, 0.25 or print $_
for 1 .. 5;
...
quite interesting chunk of code - but what the hell does select does
here? Yeah - I rtfm - but didn't understand it - maybe one could
explain it in more simple words?

It's used in this case for sleeping for less than one second. The sleep()
function only sleeps for a whole number of seconds.

Not exactly a transparent piece of code though is it. Especially
if your base system isn't Unix!

Yes, I agree, but technically it's not my code snippet. From whoever I
learned the autoflushing technique from, they gave me this code
snippet. Yeah, I was confused about the select statement, but the
perldoc on select does have that same snippet for delaying 1/4 second.

Oh well....

Kevin


--
Kevin Old <[Email Removed]>

R. Joseph Newton
Dan Anderson wrote:

QUOTE
There are many references , what line number does it say
is evil and which line below is that?

Thanks for your help, I have put a -----right here ----- in the code...

}
$SQL .= "n";
}
#---------right here------
}
$SQL .= ");nn";
return $SQL;

Given that your error message indicates a problem with a hash ref, and that
the compiler stopped at the end of a loop, I'd say the problem has something
to do with mismatched braces. Unfortunately, your code is way too thick to
be worth crawling through without context.

Lets look at some of the factors that make this difficult to debug:

This:

my @options = @{ $hash{options} };
while ($_ = shift (@options)) {
if ($_ =~ m/not null/i) {
$SQL .= "NOT NULL ";
}
...
else {
$debugger->error("Option: $_ is not known.
Assuming it's database specific and ignoring.");
}
}
$SQL .= "n";
}

should be afunction of its own, with clearly named parameters. So should
this:

$SQL .= "CREATE TABLE $table_namen";
$SQL .= "(n";
while (my %hash = %{ shift (@columns) }) {
$SQL .= " $hash{name} ";
if ($hash{type} =~ m/INT/i) {
}
#---------right here------
}
$SQL .= ");nn";
return $SQL;

the enclosing block, although I can't say for sure that I picked the right
ending brace for the start. That uncertainty is the whole point. There are
many challenges in programming that are more worthy of your efforts than
tracking braces. One of them is organizing functionality.

while ($_ = shift (@temp)) {
my $temp3 = {
name => $_,

So you are naming some that is temporary, huh? Gee, uh, well, that's nice
to know. It would be even nicer to know what this temporary thing
represents. Choose your variable names with more care.

Programming should be about something. The identifiers you use should tell
you what the code is about.

Joseph

Wiggins D Anconia
QUOTE
Hello Guys,
I Wanted to know what are the differences in version 5.005 and version
v.5.8.0 of perl . please let me know where can I find this info

perldoc perldelta

Will in general tell you the significant changes in the version you are
using compared to a previous significant version.

perldoc perl

Should provide you a list of the available delta's, reading through each
should give you an idea, and maybe put you to sleep....

Those are pretty significant version differences...

http://danconia.org

Dan Muey
QUOTE
I just added a new method called isadmin  to existing and
working module Noc1.pm

Did you create Noc1 ???

QUOTE

And use this new added method in my index.html like this

index.html ??? Hows' that work?

QUOTE

use Noc1;
my $noc =  new noc1;
my public = noc->ispublic();
^^^^^^  ^^^

Do you mean $public and $noc ??

QUOTE
my $admin = noc->isadmin();
    ^^^

$noc again??

QUOTE

if ($admin) { blah blah blah}

When i tried to access index.html i got the error msg...
can't locate object method "isadmin" via package 'Noc1" at
.../index.html line 21

Do you know what is the problem here ?

Did you make it exportable?
I sit really in there just like that?

How about some backgound on Noc1.pm and some code from it to show how it's used

QUOTE
Everything works fine with Noc1.pm and index.html until i
add my new method isadmin in.

thanks for your help

HTH

DMuey

Rob Dixon
R. Joseph Newton wrote:
QUOTE

There are many references , what line number does it say
is evil and which line below is that?

Thanks for your help, I have put a -----right here ----- in the code...

}
$SQL .= "n";
}
#---------right here------
}
$SQL .= ");nn";
return $SQL;

Given that your error message indicates a problem with a hash ref, and that
the compiler stopped at the end of a loop, I'd say the problem has something
to do with mismatched braces.  Unfortunately, your code is way too thick to
be worth crawling through without context.

Lets look at some of the factors that make this difficult to debug:

This:

my @options = @{ $hash{options} };
while ($_ = shift (@options)) {
if ($_ =~ m/not null/i) {
$SQL .= "NOT NULL ";
}
...
else {
$debugger->error("Option: $_ is not known.
Assuming it's database specific and ignoring.");
}
}
$SQL .= "n";
}

should be afunction of its own, with clearly named parameters.  So should
this:

$SQL .= "CREATE TABLE $table_namen";
$SQL .= "(n";
while (my %hash = %{ shift (@columns) }) {
$SQL .= "  $hash{name} ";
if ($hash{type} =~ m/INT/i) {
}
#---------right here------
}
$SQL .= ");nn";
return $SQL;

the enclosing block, although I can't say for sure that I picked the right
ending brace for the start.  That uncertainty is the whole point.  There are
many challenges in programming that are more worthy of your efforts than
tracking braces.  One of them is organizing functionality.

while ($_ = shift (@temp)) {
my $temp3 = {
name => $_,

So you are naming some that is temporary, huh?  Gee, uh, well, that's nice
to know.  It would be even nicer to know what this temporary thing
represents.  Choose your variable names with more care.

Programming should be about something.  The identifiers you use should tell
you what the code is about.

I agree with you completely Joseph, but I'd be grateful for just
proper indentation and whitespace. It's impossible to write code
layed out like this without some trial-and-error placement of
block terminators. I started to lay out the code to find the bug
but gave up after about five minutes.

In the absence of any specific guidelines you should aim for
what is layed out in

perldoc perlstyle

People will forgive even major deviations form this standard,
but the above code may as well be written on a single line.
Perhaps there should be a 'Darwin Awards' for programming style?

Cheers,

Rob

Rob Dixon
Kevin Old wrote:
QUOTE

On Thu, 2003-11-13 at 09:33, Rob Dixon wrote:
"Bob Showalter" <[Email Removed]> wrote in message

Christiane Nerz wrote:
Kevin Old wrote:
...
select undef, undef, undef, 0.25 or print $_
for 1 .. 5;
...
quite interesting chunk of code - but what the hell does select does
here? Yeah - I rtfm - but didn't understand it - maybe one could
explain it in more simple words?

It's used in this case for sleeping for less than one second. The sleep()
function only sleeps for a whole number of seconds.

Not exactly a transparent piece of code though is it. Especially
if your base system isn't Unix!

Yes, I agree, but technically it's not my code snippet.  From whoever I
learned the autoflushing technique from, they gave me this code
snippet.  Yeah, I was confused about the select statement, but the
perldoc on select does have that same snippet for delaying 1/4 second.

Don't worry Kevin, I wasn't getting at you! Your example is
indeed straight from

perldoc -f select

but I was trying to say that it was so obscure it ought
to be wrapped within a subroutine, something like

# Do a high-resolution sleep using 'select'
#
sub sleep_hires {
select(undef, undef, undef, shift);
}

Cheers,

Rob

James Edward Gray II
On Nov 13, 2003, at 10:01 AM, Jeff 'japhy' Pinyan wrote:

QUOTE
No, int() is neither exactly like ceil() or floor().  All int() does is
truncate the number to an integer.  If you have 2.3, you get 2.  If you
have 2.9, you get 2.  If you have -2.3, you get -2.  If you have -2.9,
you
get -2.  If you were to write int() as a function of ceil() and/or
floor(), you'd have to say:

sub int { my $x = shift; $x > 0 ? floor($x) : ceil($x); }

You're right. I was only thinking of positive numbers. My bad. Sorry.

James

Mike Blezien
Hi,

so I guess my question is, if I want to accomplish the same results as this
"ceil" how would that be accomplished in Perl ??

thx's
--
Mike<mickalo>Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Quality Web Hosting
http://www.justlightening.net
MSN: [Email Removed]
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


QUOTE
Jeff 'japhy' Pinyan wrote:
On Nov 13, James Edward Gray II said:


On Nov 13, 2003, at 9:50 AM, Bob Showalter wrote:


Mike Blezien wrote:

Hi,

Ran accross a function called "ceil" and from the information I got
on this:

"ceil() [Stands for ceiling], it just rounds a float value up.. so
ceil(4.7) == ceil(4.1342) == 5"

would this be the same as using "int" function in perl

No. int() simply drops the fractional part.

ceil() is often presented with a sister function called floor().  That
would be the same as Perl's int().


No, int() is neither exactly like ceil() or floor().  All int() does is
truncate the number to an integer.  If you have 2.3, you get 2.  If you
have 2.9, you get 2.  If you have -2.3, you get -2.  If you have -2.9, you
get -2.  If you were to write int() as a function of ceil() and/or
floor(), you'd have to say:

sub int { my $x = shift; $x > 0 ? floor($x) : ceil($x); }


James Edward Gray II
On Nov 13, 2003, at 10:38 AM, Mike Blezien wrote:

QUOTE
Hi,

so I guess my question is, if I want to accomplish the same results as
this "ceil" how would that be accomplished in Perl ??

Does this one-liner get you started?

perl -e 'use POSIX qw(ceil); print ceil(2.3), "n";'

James

Mike Blezien
Yes, this did the trick exactly :)

thanks for your help

--
Mike<mickalo>Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Quality Web Hosting
http://www.justlightening.net
MSN: [Email Removed]
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



QUOTE
James Edward Gray II wrote:
On Nov 13, 2003, at 10:38 AM, Mike Blezien wrote:

Hi,

so I guess my question is, if I want to accomplish the same results as
this "ceil" how would that be accomplished in Perl ??


Does this one-liner get you started?

perl -e 'use POSIX qw(ceil); print ceil(2.3), "n";'

James



George Schlossnagle
On Nov 13, 2003, at 11:38 AM, Mike Blezien wrote:

QUOTE
Hi,

so I guess my question is, if I want to accomplish the same results as
this "ceil" how would that be accomplished in Perl ??

use POSIX qw/ceil/;

$float = '1.9';
print ceil($float);

Daniel Staal
--On Wednesday, November 12, 2003 6:25 PM -0500 Casey West
<[Email Removed]> wrote:

QUOTE
It was Wednesday, November 12, 2003 when [Email Removed] took the
soap box, saying:
: hum could we not get a nice topic prefix added to the list?
: it would make it a lot easy to make mail filters that could kill
: all mail going to this address, not from the list.?

No, we won't be doing that.

Use the headers.  Perhaps Delivered-To could help.

How about the RFC 2919 headers that this list thoughtfully includes
(though it misses one...).

The following are included in every email from this list:

List-Post: <mailto:[Email Removed]>
List-Help: <mailto:[Email Removed]>
List-Unsubscribe: <mailto:[Email Removed]>
List-Subscribe: <mailto:[Email Removed]>

Daniel T. Staal

---------------------------------------------------------------
This email copyright the author. Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes. This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------

Nandita Mullapudi
Thanks,
-Nandita


QUOTE
-----Original Message-----
From: Nandita Mullapudi [mailto:[Email Removed]]
Sent: Thursday, November 13, 2003 5:16 PM
To: [Email Removed]
Subject: regexp matching- real simple!


This has to be really easy- but I cant get it to work:
I want my script to carry out a loop only if the number stored in
$diff is positive,
so i say
if ($diff =~m/^[-d+]/) {blah blah}
but it won't work. why?
TIA
-Nandita

--

Is the number stored as a string?  Probably not.  Why not use:
if ($diff > 0) {blah blah}

Chris.


Douglas Houston
Hi,

I am trying to initialize a dynamically-named array, i.e. with the
following test code (if I type "script.pl char" at the command prompt) I
get the message "array char contains 1 2 3" but I get a warning if 'use
strict' is on. Can anyone show me how it should be done (I would like to
use 'use strict'!)?

#!/usr/bin/perl -w
#use strict;
my ($string);

while (<$ARGV[0]>) {
chomp($string=$_);
@$string = (1,2,3); #Won't work if 'use strict' pragma is used
}

print "array $string contains @$stringn";

Jeff 'Japhy' Pinyan
On Nov 14, angie ahl said:

QUOTE
I want to return an array and 2 scalars.

Well, you're returning an array reference and two scalar references. I
don't think the scalars need to be referenced, but I would probably keep
the array reference.

QUOTE
sub EventList {
my ($class, %arg) = @_;
# load of code here
return (@list, $startdate, $enddate);
}

return ($startdate, $enddate, @list);

QUOTE
my $event = Event->new;
my @tempres = $event->EventList(skip=>0, max=>10);
my $startdate = $tempres[2];
my $enddate = $tempres[3];

You'd need $tempres[1] and $tempres[2], since arrays are 0-based, but
you'd also need ${ $tempres[1] } and ${ $tempres[2] }, since you're
returning references to those scalars. Using my return values, you'd do:

my ($start, $end, $listref) = $event->EventList(skip => 0, max => 10);

--
Jeff "japhy" Pinyan [Email Removed] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
<stu> what does y/// stand for? <tenderpuss> why, yansliterate of course.
[ I'm looking for programming work. If you like my work, let me know. ]

Jeff 'Japhy' Pinyan
On Nov 14, Douglas Houston said:

QUOTE
I am trying to initialize a dynamically-named array, i.e. with the
following test code (if I type "script.pl char" at the command prompt) I
get the message "array char contains 1 2 3" but I get a warning if 'use
strict' is on. Can anyone show me how it should be done (I would like to
use 'use strict'!)?

You need to explain WHY you want to do this. There doesn't seem to me to
be a good reason. Use a hash of array references. Don't turn off strict.

#!/usr/bin/perl

use strict;
use warnings; # perl5.6+

my %data;
my $name = shift;
$data{$name} = [1,2,3];
# or
# @{ $data{$name} } = (1,2,3);

And your "while (<$ARGV[0]>)" is weird, and not working why you think it
works.

--
Jeff "japhy" Pinyan [Email Removed] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
<stu> what does y/// stand for? <tenderpuss> why, yansliterate of course.
[ I'm looking for programming work. If you like my work, let me know. ]

Douglas Houston
On Fri, 14 Nov 2003, Jeff 'japhy' Pinyan wrote:

QUOTE
On Nov 14, Douglas Houston said:

I am trying to initialize a dynamically-named array, i.e. with the
following test code (if I type "script.pl char" at the command prompt) I
get the message "array char contains 1 2 3" but I get a warning if 'use
strict' is on. Can anyone show me how it should be done (I would like to
use 'use strict'!)?

You need to explain WHY you want to do this.  There doesn't seem to me to
be a good reason.  Use a hash of array references.  Don't turn off strict.


WHY do I need to explain why I want to do this? There certainly isn't a
good reason to do it with the test code I posted. If there's NEVER a good
reason, what are the alternatives?

QUOTE
And your "while (<$ARGV[0]>)" is weird, and not working why you think it
works.


Can you

a) explain how I think it works, and

b) explain why it really works.

Jeff 'Japhy' Pinyan
On Nov 14, Douglas Houston said:

QUOTE
On Fri, 14 Nov 2003, Jeff 'japhy' Pinyan wrote:

On Nov 14, Douglas Houston said:

I am trying to initialize a dynamically-named array, i.e. with the
following test code (if I type "script.pl char" at the command prompt) I
get the message "array char contains 1 2 3" but I get a warning if 'use
strict' is on. Can anyone show me how it should be done (I would like to
use 'use strict'!)?

You need to explain WHY you want to do this.  There doesn't seem to me to
be a good reason.  Use a hash of array references.  Don't turn off strict.

WHY do I need to explain why I want to do this? There certainly isn't a
good reason to do it with the test code I posted. If there's NEVER a good
reason, what are the alternatives?

You need to explain why you want to do it is because it can create
problems down the line. As for an alternative, I told you and showed you:
use a hash of array references.

$hash{foo} = [10, 20, 30];
print $hash{foo}[2]; # 30

QUOTE
And your "while (<$ARGV[0]>)" is weird, and not working why you think it
works.

a) explain how I think it works, and

I don't know how you think it works, I'm just quite sure that you're using
that construct because you think it is a standard thing to do, and it's
not. How do YOU think it works? What if the first argument to your
program was "foo*"?

QUOTE
b) explain why it really works.

Perl thinks you're doing a file glob. <> is a read from a filehandle
unless is something more complex than an identifier or a simple
scalar. Thus, <$foo[$x]> is a file glob, glob($foo[$x]). If $foo[$x] has
any wildcards or such, the shell expands that glob to all the files
matching the pattern. But if it's just 'blah', glob('blah') returns
'blah'. Then, the next time, it returns undef, because it's done
returning them.

If that sounds complex, that's because it IS. Doing what you did works in
some cases, for a bizarre reason.

--
Jeff "japhy" Pinyan [Email Removed] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
<stu> what does y/// stand for? <tenderpuss> why, yansliterate of course.
[ I'm looking for programming work. If you like my work, let me know. ]

Angie Ahl
I changed my code so the variables aren't references;

sub EventList {
my ($class, %arg) = @_;
# load of code here
return (@list, $startdate, $enddate);
}

And then called it like so:

my @tempres = $event->EventList(skip=>0, max=>10);
my $EventList = @tempres[0];
my @EventList = @{$EventList};

my $startdate = @tempres[1];
my $enddate = @tempres[2];

Angie

QUOTE
I have an package called "Event"

in it I have a subroutine called EventList

I want to return an array and 2 scalars.

sub EventList {
my ($class, %arg) = @_;
# load of code here
return (@list, $startdate, $enddate);
}

So far so good (I think)

but I don't seem to be able to access it. I've tried all sorts:

my $event = Event->new;
my @tempres = $event->EventList(skip=>0, max=>10);
my $startdate = $tempres[2];
my $enddate = $tempres[3];



Randal L. Schwartz
QUOTE
"Douglas" == Douglas Houston <[Email Removed]> writes:

Douglas> I am trying to initialize a dynamically-named array,
Douglas> i.e. with the following test code (if I type "script.pl char"
Douglas> at the command prompt) I get the message "array char contains
Douglas> 1 2 3" but I get a warning if 'use strict' is on. Can anyone
Douglas> show me how it should be done (I would like to use 'use
Douglas> strict'!)?

It should be done by not doing it. Do not use data to define metadata (like
variable names). Down that path lies madness. "use strict" is trying
to keep you from going mad.

Probably what you are looking for is a hash containing arrayrefs,
pointing at your real data.

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +
<[Email Removed]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

Wiggins D Anconia
QUOTE
Hi,

I am trying to initialize a dynamically-named array, i.e. with the
following test code (if I type "script.pl char" at the command prompt) I
get the message "array char contains 1 2 3" but I get a warning if 'use
strict' is on. Can anyone show me how it should be done (I would like to
use 'use strict'!)?

#!/usr/bin/perl -w
#use strict;
my ($string);

while (<$ARGV[0]>) {
chomp($string=$_);
@$string = (1,2,3);  #Won't work if 'use strict' pragma is used
}

print "array $string contains @$stringn";



Well that is kind of the point, you don't :-). That is specifically what
the 'refs' part of 'strict' prevents (symbolic references), for good reason.

perldoc strict

In newer Perls you can shut off that portion of the stricture lexically,
or a better idea is to store a reference to an anonymous array to a
hash, then use the hash key as its name.

my %hash;
$hash{'array_name'} = [ 'one','two','three' ];

print $hash{'array_name'}->[2];

perldoc perlreftut
perldoc perlref

http://danconia.org

Charles K. Clarkson
Douglas Houston [mailto:[Email Removed]]
:
: WHY do I need to explain why I want to do this?

Because no one wants to give a loaded gun to
someone who hasn't demonstrated a good grasp of
gun safety.


HTH,

Charles K. Clarkson
--
Head Bottle Washer,
Clarkson Energy Homes, Inc.
Mobile Home Specialists


Wiggins D Anconia
QUOTE
Douglas Houston [mailto:[Email Removed]]
:
: WHY do I need to explain why I want to do this?

Because no one wants to give a loaded gun to
someone who hasn't demonstrated a good grasp of
gun safety.



That is a very ironic response coming from someone who based on their
sig I assume is in the US, going to someone based on their address
appears to be in the UK... who'd a thunk it...

http://danconia.org

Steve Grazzini
On Fri, Nov 14, 2003 at 04:30:05PM +0000, Douglas Houston wrote:
QUOTE
On Fri, 14 Nov 2003, Jeff 'japhy' Pinyan wrote:
On Nov 14, Douglas Houston said:

I am trying to initialize a dynamically-named array

You need to explain WHY you want to do this.  There doesn't seem to me to
be a good reason.  Use a hash of array references.  Don't turn off strict.

WHY do I need to explain why I want to do this? There certainly isn't a
good reason to do it with the test code I posted.

Probably Jeff was being polite, giving you the benefit of the doubt,
allowing you to remain innocent-until-proven-guilty, etc. The fact is,
there are very few good reasons to use symrefs -- exporting symbols is
the only one I can think of -- and if you have a good reason, you'll need
to give us some more information.

QUOTE
If there's NEVER a good reason,

It's not that there's "NEVER" a good reason to use symbolic references.

It's just that the code you posted doesn't have one. :-)

QUOTE
what are the alternatives?

Use a hash of array references. Instead of this:

@$name = (1,2,3); # gack! what if $name is "_" or "INC"?

use this.

$hash{$name} = [1,2,3];

QUOTE
And your "while (<$ARGV[0]>)" is weird, and not working why you think
it works.

Can you

a) explain how I think it works, and

I don't know what you think the angle-brackets do here, but...

QUOTE
b) explain why it really works.

Unless you think they do filename globbing, that code isn't working the
way you think it works.

--
Steve

Rob Dixon
Douglas Houston wrote:
QUOTE

On Fri, 14 Nov 2003, Jeff 'japhy' Pinyan wrote:

On Nov 14, Douglas Houston said:

I am trying to initialize a dynamically-named array, i.e. with the
following test code (if I type "script.pl char" at the command prompt) I
get the message "array char contains 1 2 3" but I get a warning if 'use
strict' is on. Can anyone show me how it should be done (I would like to
use 'use strict'!)?

You need to explain WHY you want to do this.  There doesn't seem to me to
be a good reason.  Use a hash of array references.  Don't turn off strict.


WHY do I need to explain why I want to do this? There certainly isn't a
good reason to do it with the test code I posted. If there's NEVER a good
reason, what are the alternatives?

Jeff's pretty sharp. Believe him. And don't be rude to people if you're
asking for a favour.

How can anyone suggest what the 'alternatives' may be without an
explanation of the problem?

Rob

Rob Dixon
Wiggins D Anconia wrote:
QUOTE

Douglas Houston [mailto:[Email Removed]]
:
: WHY do I need to explain why I want to do this?

Because no one wants to give a loaded gun to
someone who hasn't demonstrated a good grasp of
gun safety.



That is a very ironic response coming from someone who based on their
sig I assume is in the US, going to someone based on their address
appears to be in the UK... who'd a thunk it...

I would have thought it were more ironic the other way
around. Everybody expects an American gun slinger to
threaten a peaceful Dundee land owner.

Totally :-)))))) No flames thank you.

Rob

David
Douglas Houston wrote:

QUOTE
Hi,

I am trying to initialize a dynamically-named array, i.e. with the
following test code (if I type "script.pl char" at the command prompt) I
get the message "array char contains 1 2 3" but I get a warning if 'use
strict' is on. Can anyone show me how it should be done (I would like to
use 'use strict'!)?

#!/usr/bin/perl -w
#use strict;
my ($string);

while (<$ARGV[0]>) {
chomp($string=$_);
@$string = (1,2,3);  #Won't work if 'use strict' pragma is used
}

print "array $string contains @$stringn";

this normally can't be done cleanly and is generally not recommanded given
there are other ways to accomplish bascially the same thing. but if you are
here to see if it can be done at all, you might want to try something like:

#!/usr/bin/perl -w
use strict;

my $name = shift;

eval <<CODE;
no strict;
@ $name=1..3;
print "$_\n" for(@ $name);
CODE

#--
#-- print it again after eval
#--
while(my($k,$v) = each %::){
next unless($k =~ /^$name$/);
local *sym = $v;
print join("n",@main::sym),"n";
}

__END__

prints:

1
2
3
1
2
3

david
--
$_='015001450154015401570040016701570162015401440'
,*,=*|=*_,split+local$";map{~$_&1&&{$,<<=1,$#.=qq~
/63968e72w28@_[$_..$||3])=>~}}0..s,.,,g-01;*_=*#,s
[[s/eval+w/.`9`/e]]n\xng.print+eval(eval"qq`$_`")

Steve Grazzini
On Fri, Nov 14, 2003 at 12:25:41PM -0800, david wrote:
QUOTE
Douglas Houston wrote:

I am trying to initialize a dynamically-named array

this normally can't be done cleanly and is generally not recommanded given
there are other ways to accomplish bascially the same thing. but if you are
here to see if it can be done at all, you might want to try something like:

#!/usr/bin/perl -w
use strict;

my $name = shift;

eval <<CODE;
no strict;
@ $name=1..3;
print "$_\n" for(@ $name);
CODE

Sigh... :-)

The point is not that *symrefs* are inherently bad. The point is that
turning data into variable names can cause huge, nightmarish maintenance
problems. Even though your code doesn't have any symbolic references,
it can still cause all the same maintenance problems... and it's so much
uglier than just using symrefs in the first place!

QUOTE
while(my($k,$v) = each %::){
next unless($k =~ /^$name$/);
local *sym = $v;
print join("n",@main::sym),"n";
}

For that matter, you can set the values by munging the symbol table:

use strict;
my $name = 'foo';

$::{$name} = [1,2,3]; # LHS is a glob
print "@{ $::{$name} }n";

no strict 'vars';
print "@foon";

But why use the symbol table at all? That's more dangerous than using
a regular hash, and more awkward than using the symbolic references.

--
Steve

Steve Grazzini
On Fri, Nov 14, 2003 at 01:24:53PM -0800, david wrote:
QUOTE
David wrote:
this normally can't be done cleanly and is generally not recommanded
given there are other ways to accomplish bascially the same thing.

Steve Grazzini wrote:
But why use the symbol table at all?  That's more dangerous than using
a regular hash, and more awkward than using the symbolic references.

didn't i already mention that? :-)

Yeah...

There's just a long tradition of telling people how to use eval() and %::
to get strict-safe-symrefs, and an equally long tradition of smacking whomever
does it. :-)

--
Steve

David
David wrote:

QUOTE
this normally can't be done cleanly and is generally not recommanded
given there are other ways to accomplish bascially the same thing.

Steve Grazzini wrote:

QUOTE

But why use the symbol table at all?  That's more dangerous than using
a regular hash, and more awkward than using the symbolic references.


didn't i already mention that? :-)

david
--
$_='015001450154015401570040016701570162015401440'
,*,=*|=*_,split+local$";map{~$_&1&&{$,<<=1,$#.=qq~
/63968e72w28@_[$_..$||3])=>~}}0..s,.,,g-01;*_=*#,s
[[s/eval+w/.`9`/e]]n\xng.print+eval(eval"qq`$_`")

Rob Dixon
Steve Grazzini wrote:
QUOTE

On Fri, Nov 14, 2003 at 12:25:41PM -0800, david wrote:
Douglas Houston wrote:

I am trying to initialize a dynamically-named array

this normally can't be done cleanly and is generally not recommanded given
there are other ways to accomplish bascially the same thing. but if you are
here to see if it can be done at all, you might want to try something like:

#!/usr/bin/perl -w
use strict;

my $name = shift;

eval <<CODE;
no strict;
@ $name=1..3;
print "$_\n" for(@ $name);
CODE

Sigh...  :-)

The point is not that *symrefs* are inherently bad.  The point is that
turning data into variable names can cause huge, nightmarish maintenance
problems.  Even though your code doesn't have any symbolic references,
it can still cause all the same maintenance problems... and it's so much
uglier than just using symrefs in the first place!

Thanks Steve. I agree

There's nothing wrong with 'pass by name' code parameters
as such. Algol 60 used to do it as a matter of course, but guess why
it was dropped? For the same reason that "use strict 'refs'"
prohibits it.

Rob

Drieux
On Friday, Nov 14, 2003, at 18:39 US/Pacific, Jerry Rocteur wrote:

QUOTE
Beautiful drieux, what a sexy way to do a system call!!

And I never knew about $host = hostname;.. What a neat trick..

Keep 'em comin...

Wiggins is the one who deserves the point,
since he was the one with the reference
to Sys::Hostname, and when one sees such
things one should just do the

perldoc Sys::Hostname

read the pod, copy and paste from the pod
the call that one needs and move on to
the next problem.

ciao
drieux

---

Drieux
On Friday, Nov 14, 2003, at 07:19 US/Pacific, angie ahl wrote:
[..]
QUOTE
I changed my code so the variables aren't references;

sub EventList {
my ($class, %arg) = @_;
# load of code here
return (@list, $startdate, $enddate);
}

And then called it like so:

my @tempres = $event->EventList(skip=>0, max=>10);
my $EventList = @tempres[0];
my @EventList = @{$EventList};

my $startdate = @tempres[1];
my $enddate = @tempres[2];

Angie

What folks need to remember is that perl is
a list muncher and it really is the only 'interface'
into and out of functions/methods - hence all calls
will be of the form

my @got_back = $obj->method_foo(@arglist);

but that would also allow one to 'put them in list context'
in the form

my ($list_ref, $startdate, $enddate) = $obj->EventList(%args);

note I have shifted to the idea of having your sub in the form

sub EventList {
my ($class, $arg_hash_ref) = @_;
# load of code here
return (@list, $startdate, $enddate);
}

Since one doesn't need to pass the whole Hash, merely a
reference to it.

Folks need to feel safe about referencing and dereferencing.
Since that $arg_has_ref will look like a hash with

while ( my ($k,$v) = each %$arg_hash_ref) {...}

or one can access a key in it with

my $val = $arg_hash_ref->{'ThatKey'};

and of course the re-refing of the array would be

foreach my $event (@$list_ref)
{
#deal with the event here
}

HTH.


ciao
drieux

---

Drieux
On Friday, Nov 14, 2003, at 09:07 US/Pacific, Wiggins d Anconia wrote:
QUOTE
Douglas Houston [mailto:[Email Removed]]
:
: WHY do I need to explain why I want to do this?

Because no one wants to give a loaded gun to
someone who hasn't demonstrated a good grasp of
gun safety.

That is a very ironic response coming from someone who based on their
sig I assume is in the US, going to someone based on their address
appears to be in the UK... who'd a thunk it...

p0: having been a card carrying member of the
Haverfordwest Pistol Club, dyfed wales, allow me
to underscore the importance of firearm safety
in both the USA and the UK, and that contrary
to some failures to comprehend, the reasons actually
are independent of Nation of Origin, passport,
gene pool number, etc, etc, etc. So when we plan
to have these moments, remember what Uncle Drieux would say:

Don't Make ME stop this armoured column and come back there...

that having been said, let us return to the topic.

p1: the messy bit in all of this is the OP's initial
assertion

"I am trying to initialize a dynamically-named array"

and provided an illustration that makes us all
jump into the slit trenches screaming

PSYCHO ALERT!!!

And some of us because

a. we did that to ourselves
b. we had to UnDO that from someone else

at which point we arrive at the counter question:

"WHY do I need to explain why I want to do this?
There certainly isn't a good reason to do it with
the test code I posted. If there's NEVER a good
reason, what are the alternatives?"

And that drives us back to the basic problem,

What exactly ARE you trying to solve here?

At one end of the issue is the question of getting
command line arguments IN,

cf perldoc GetOpt::Long
# because sooner or later you will need the --WingDingDing
# types of command line options

Then there is that other type of Issue with how
to do configuration files, and getting stuff in
from a config file

cf:
<http://www.wetware.com/drieux/PR/blog2/Code/200311.html#id3151675135>
as one of several problems.

then there are the possible issues with using anonymouse arrays,
hashes, subs, and the general issues of referencing and dereferencing..

So yeah, it would sorta help us help you with what Exactly IS one
really trying to do....

p3: and while we are wandering out the door,
try to remember boys and girls, that from
San Francisco and Hawai'i one has to go
to the wild wild east to find 'cowboys',
so let's Put the Six Guns away and get
back on the Big Bus....

ciao
drieux

---

Randal L. Schwartz
QUOTE
"Charles" == Charles K Clarkson <[Email Removed]> writes:

Charles> : WHY do I need to explain why I want to do this?

Charles> Because no one wants to give a loaded gun to
Charles> someone who hasn't demonstrated a good grasp of
Charles> gun safety.

Well said!

It's like you've asked "How do I remove this screw with a hammer?"

You're going to get a lot of strange looks, and a bunch of "don't do
that", and a few people will hand you a screwdriver instead.

You don't get to ask the question blindly. We're watching out
for your actual intent and continued success.

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +
<[Email Removed]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

R. Joseph Newton
Rob Dixon wrote:

QUOTE

Not exactly a transparent piece of code though is it. Especially
if your base system isn't Unix!

Works jusat fine on Windows, although it helps to have a longer list, since this gets p[rocessed really fast, too fast to
see what's going on. Try increasing the loop count to 40.

Joseph

Rob Dixon
R. Joseph Newton wrote:
QUOTE

Rob Dixon wrote:


Not exactly a transparent piece of code though is it. Especially
if your base system isn't Unix!

Works jusat fine on Windows, although it helps to have a longer list, since this gets p[rocessed really fast, too fast to
see what's going on.  Try increasing the loop count to 40.

Joseph




PHP Help | Linux Help | Web Hosting | Reseller Hosting | SSL Hosting
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2006 Invision Power Services, Inc.