On Thu, Oct 16, 2008 at 7:57 PM, John W. Krahn <[EMAIL PROTECTED]> wrote:
> print "$ip/" . unpack "%32b*", inet_aton $mask;
> '
Thanks, that's the cool solution.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On Oct 16, 2008, at 8:08 AM, "John W. Krahn" <[EMAIL PROTECTED]> wrote:
sanket vaidya wrote:
Hi all,
This is the exact same question you asked 16 days ago. Did you not
like the answer you got then? (Which is the same as the answers you
are getting now.)
John
--
Perl isn't a toolbox
Deviloper wrote:
The last time I considered using eval is years ago.
I remember that I had read an article somewhere that doing eval could lead to dramatic performance issues.
I want to use eval{} to check my db-transactions. I looking for informations at
perldoc eval, but there is nothing me
Hi,
I need to create permutations of a given set of values.
The set is itself present in an array. From this I am trying to create
another array that has permutations of this set.
I am able to create a small example and run but from the description of
the module I am not sure how to put the permu
sanket vaidya wrote:
Hi all,
This is the exact same question you asked 16 days ago. Did you not like
the answer you got then? (Which is the same as the answers you are
getting now.)
John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools
> Message du 16/10/08 14:12
> De : [EMAIL PROTECTED]
> A : [EMAIL PROTECTED], beginners@perl.org
> Copie à :
> Objet : RE: sendmail module
>
>
>
> Hi All/Jeff,
>
> Somehow I am not able to install/configure Sendmail module. Can somebody
> have another option/script/module then please let me know.
>
Hi All/Jeff,
Somehow I am not able to install/configure Sendmail module. Can somebody
have another option/script/module then please let me know.
I am really stuck.
Please help/advise.
Regards
Irf.
-Original Message-
From: Jeff Pang [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 16,
On Thu, Oct 16, 2008 at 12:38:54PM +0100, Deviloper wrote:
> The last time I considered using eval is years ago. I remember that I
> had read an article somewhere that doing eval could lead to dramatic
> performance issues.
>
> I want to use eval{} to check my db-transactions. I looking for
> in
> Message du 16/10/08 13:19
> De : "sheela b"
> A : beginners@perl.org
> Copie à :
> Objet : Redirect option
>
> Is there any option to redirect a URL in perl other than Location ?
Why not Location?
If you use CGI.pm, you could look for redirect() method in it.
But it is essentially printing a "L
Net::Netmask does such things, too.
"John W. Krahn" <[EMAIL PROTECTED]> hat am 16. Oktober 2008 um 12:57
geschrieben:
> Sandy lone wrote:
> > I need to translate an IP addr with its mask from this form:
> >
> > 192.168.1.30/255.255.255.0
> >
> > to this one:
> >
> > 192.168.1.30/24
>
> One w
Sandy lone wrote:
I need to translate an IP addr with its mask from this form:
192.168.1.30/255.255.255.0
to this one:
192.168.1.30/24
One way to do it:
$ perl -le'
use Socket;
my $stuff = "192.168.1.30/255.255.255.0";
my ( $ip, $mask ) = split /\//, $stuff;
print "$ip/" . unpack "%32b*
The last time I considered using eval is years ago.
I remember that I had read an article somewhere that doing eval could lead to
dramatic performance issues.
I want to use eval{} to check my db-transactions. I looking for informations at
perldoc eval, but there is nothing mentioned about perfo
If this helps:
I am using Log4Perl in a typical forked-to-background-daemon.
I had to do a little thinking to figure out the best place to initialize
Log4Perl.
The problem is, that the utilized shared vars lost their sharedness in the
child proc.
Maybe you have to initialize your Log4Perl-Obje
Is there any option to redirect a URL in perl other than Location ?
Regards
Sheela
On Oct 14, 6:41 am, [EMAIL PROTECTED] (Protoplasm) wrote:
> I'm attempting to write some code using the Config::INI::Simple
> module. When I run the app I get the following:
>
> Use of uninitialized value in concatenation (.) or string at ./open-
> file2.pl line 35.
> Use of uninitialized value in
On Thu, Oct 16, 2008 at 03:20:13AM -0700, Jeff Pang wrote:
> --- On Thu, 10/16/08, sanket vaidya <[EMAIL PROTECTED]> wrote:
> > From: Chas. Owens [mailto:[EMAIL PROTECTED]
> >
> > > What you really want to say is
> > >
> > > print $string eq "test" ? "correct" : "";
print "correct" if $str eq "te
On Thu, Oct 16, 2008 at 06:12, sanket vaidya <[EMAIL PROTECTED]> wrote:
snip
> How can I write
>
> if ($string eq "test") {
>print "correct"
> } else {
>die "others"
> }
>
> In above way?
snip
In general, the ternary operator should only be used when choosing
between two (or more in the ca
On Wed, Oct 15, 2008 at 11:21, Zeba <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to write a perl program where I need to check when a
> process was started. I have found a way to do this in linux. Can any
> one help me on how to accomplish this in windows? I tried using the
> tasklist windows co
--- On Thu, 10/16/08, sanket vaidya <[EMAIL PROTECTED]> wrote:
> From: sanket vaidya <[EMAIL PROTECTED]>
> Subject: RE: if condition question
> To: beginners@perl.org
> Date: Thursday, October 16, 2008, 6:12 AM
> -Original Message-
> From: Chas. Owens [mailto:[EMAIL PROTECTED]
> Sent: Th
-Original Message-
From: Chas. Owens [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 16, 2008 2:36 PM
To: sanket vaidya
Cc: beginners@perl.org
Subject: Re: if condition question
On Thu, Oct 16, 2008 at 04:54, sanket vaidya <[EMAIL PROTECTED]>
wrote:
snip
> Now when I write the same if
On Thu, Oct 16, 2008 at 05:44, Sandy lone <[EMAIL PROTECTED]> wrote:
> I need to translate an IP addr with its mask from this form:
>
> 192.168.1.30/255.255.255.0
>
> to this one:
>
> 192.168.1.30/24
>
>
> which module/method is right to use? Thanks.
A quick search of CPAN* turned up NetAddr::IP w
Hi,
I'm trying to write a perl program where I need to check when a
process was started. I have found a way to do this in linux. Can any
one help me on how to accomplish this in windows? I tried using the
tasklist windows command, but that seems to give only the process ID
and some other details (
I need to translate an IP addr with its mask from this form:
192.168.1.30/255.255.255.0
to this one:
192.168.1.30/24
which module/method is right to use? Thanks.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On Wed, Oct 15, 2008 at 5:17 AM, <[EMAIL PROTECTED]> wrote:
> I had a similar problem. Check out the contents of your urllist. This
> is what mine looked like:
>
> cpan[1]> o conf urllist
> urllist
> 0 []
> 1 [ftp://carroll.cac.psu.edu/pub/CPAN/]
> 2 [ftp://cpan-du
Jeff.
--- On Thu, 10/16/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> Subject: sendmail module
> To: beginners@perl.org
> Date: Thursday, October 16, 2008, 5:25 AM
> Hi All,
>
>
>
> I am using Perl 5.6.1 and want to sue sendmail module. I
>
Hi All,
I am using Perl 5.6.1 and want to sue sendmail module. I have copied the
Sendmail.pm module to the mail dir. But still it is not executing
properly.
Following is the exact error.
Can't locate MIME/Base64.pm in @INC (@INC contains:
/usr/perl5/5.6.1/lib/sun4-solaris-64int /usr/perl5/5
On Thu, 16 Oct 2008 14:24:56 +0530, sanket vaidya wrote:
> use warnings;
> use strict;
Good! use warnings has shown you a bug in your code.
> my $string = "test";
>
> $string eq "test" ? print "correct" : "";
>
>
> Output:
>
> Correct
>
> Useless use of constant in void context at line 5.
--- On Thu, 10/16/08, sanket vaidya <[EMAIL PROTECTED]> wrote:
> From: sanket vaidya <[EMAIL PROTECTED]>
> Subject: if condition question
> To: beginners@perl.org
> Date: Thursday, October 16, 2008, 4:54 AM
> Hi all,
>
>
>
> Kindly go through the below codes:
>
>
>
> use warnings;
>
>
On Thu, Oct 16, 2008 at 05:05, Chas. Owens <[EMAIL PROTECTED]> wrote:
snip
> What the ternary operator* is saying is roughly equivalant to
snip
Whoops, left out the footnote:
* http://perldoc.perl.org/perlop.html#Conditional-Operator
--
Chas. Owens
wonkden.net
The most important skill a program
On Thu, Oct 16, 2008 at 04:54, sanket vaidya <[EMAIL PROTECTED]> wrote:
snip
> Now when I write the same if condition in program as below, I get warning
> along with output.
snip
> $string eq "test" ? print "correct" : "";
snip
> Useless use of constant in void context at line 5.
snip
What the ter
Hi all,
Kindly go through the below codes:
use warnings;
use strict;
my $string = "test";
if ($string eq "test")
{
print "correct";
}
Output:
Correct
Now when I write the same if condition in program as below, I get warning
along with output.
use warnings;
use strict;
On Thu, Oct 16, 2008 at 00:06, howa <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> Conside I have the code:
>
> use LWP::UserAgent ();
> use Apache::DBI ();
> use DBI ();
> ...
> ...
>
> Some points later, I want to list all the used modules, is it
> possible?
>
> E.g. Print out
>
> LWP::UserAgent
> Apa
On Wed, Oct 15, 2008 at 03:17, Marko Krstic <[EMAIL PROTECTED]> wrote:
> Hello,
>
> What is the best (shortest) way to define a hash where different keys have
> same values:
>
> %my_hash = { 1 => 'something', 2 => 'something', 3 => 'something else'};
>
> Is there a way to write something like:
>
>
On Thu, Oct 16, 2008 at 6:06 AM, howa <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> Conside I have the code:
>
> use LWP::UserAgent ();
> use Apache::DBI ();
> use DBI ();
> ...
> ...
>
> Some points later, I want to list all the used modules, is it
> possible?
>
> E.g. Print out
>
> LWP::UserAgent
>
Hello,
Conside I have the code:
use LWP::UserAgent ();
use Apache::DBI ();
use DBI ();
...
...
Some points later, I want to list all the used modules, is it
possible?
E.g. Print out
LWP::UserAgent
Apache::DBI
DBI
Thanks.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional command
* Telemachus [2008.10.15 12:35]:
> In Debian (and so probably many of its
> children), perl-doc is a distinct package and
> not installed automatically when you install the
> perl package.
>
> Stupid, but true.
Well, not to drift off-topic but it is my
understanding that it is general Debian poli
Hello,
What is the best (shortest) way to define a hash where different keys
have same values:
%my_hash = { 1 => 'something', 2 => 'something', 3 => 'something else'};
Is there a way to write something like:
%my_hash = { 1,2 => 'something', 3 => 'something else', etc...}
Thanks
--
To unsub
37 matches
Mail list logo