that function would do for you. You won't easily come up with a
valid address that would be rejected.
But please note the discussion that followed in that old thread. They
thought I ought to use Email::Valid instead. ;-)
--
Gunnar Hjalmarsson
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
you mean by that?
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
automaticly... but I couldn't find such a thing.
Which browser related file size limitations are you talking about?
CGI.pm or CGI::UploadEasy allows you to set the max size to whatever
value you wish.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e
to mix two lists in this way.
You can use a hash slice.
@{ $data{$key} }{ @fields } = split /:/, $val;
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http
idea. If it's a real world thing, you most likely should use an
HTML parser.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
.
What if you simply try to view an image with FF directly?
http://www.example.com/images/someimage.jpg
If that's not displayed as expected, there may be something with the
configuration of your FF browser.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
extension gives image/png etc.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
# This is a comment. I love comments.
# This file controls what Internet media types are sent to the client for
# given file extension(s). Sending the correct media type to the client
Steve Bertrand wrote:
Roman Makurin wrote:
On Wed, Jun 24, 2009 at 04:37:52AM +0200, Gunnar Hjalmarsson wrote:
Strange.
It looks like strictures and warnings are not enabled (@a and @b are not
declared). Try to add
use strict;
use warnings;
and see if that makes Perl give you
, but
second doesnt.
My questions are: How did you expect the second loop to work, and what
output did you get? (They both worked fine for me.)
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands
Roman Makurin wrote:
On Wed, Jun 24, 2009 at 03:02:00AM +0200, Gunnar Hjalmarsson wrote:
Roman Makurin wrote:
use constant {
A = 1,
B = 2,
C = 3 };
@a = (1, 2, 3);
@b = (A, B, C);
# first loop
while(my $i = shift @a) {
print $i, $/
}
# second loop
while(my $i
length $oldword
? sprintf %-${length_old}s, $newword
: substr $newword, 0, $length_old;
s/$oldword/$replace/;
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h
or
what should I do in order to make it work?
I suggest that you try the CGI::UploadEasy module.
http://search.cpan.org/dist/CGI-UploadEasy/
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-cgi-unsubscr...@perl.org
For additional
Rob Coops wrote:
$text = 2 minutes, and 8 seconds;
$text =~ /(\d{1,2}).*?(\d{1,2}).*/;
-^^
When you are extracting stuff, .* is _always_ redundant in the beginning
or end of a regex.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
the test script was run as
have read access to
/usr/local/lib/perl5/site_perl/5.10.0/x86_64-linux/HTML/Parser.pm ?
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h
.
Can anyone suggest me a good url which can tell the difference between two?
http://perldoc.perl.org/perlsyn.html
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h
tags in the sub not considered legitimate html code when the
head structures are identical in both the sub and the main code?
If that is true, you'd better ask W3C. It has nothing to do with Perl.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail
, there is no straight perl inline
html. HTML is HTML, whether it is on a static page or generated by a
program, e.g. a Perl program.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h
jm wrote:
Gunnar Hjalmarsson wrote:
jm wrote:
seems to be some requirement for html head via a module call that's
not necessary in straight perl inline html.
I'm still confused about what the real problem is, but it sounds like
you are on the wrong track. AFAIK, there is no straight perl
Jeff Pang wrote:
We use wget -p to get the page and its full dependency.
You could also use LWP but that's complicated to fetch the page and all
its dependency.
I thought that the portable WWW::Mechanize was the way to go rather than
wget when there is a need to follow links.
--
Gunnar
.
By writing a Perl program. Show us what you have so far, let us know
which part(s) of it you find difficult, and somebody may be willing to
help you fix it. Don't expect anybody to write the whole program for you
for free.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
AndrewMcHorney wrote:
I looked at the documentation for this function and I find it confusing.
Try File::Finder for a less confusing interface to *the module* File::Find.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr
Chas. Owens wrote:
On Mon, May 18, 2009 at 19:05, Gunnar Hjalmarsson nore...@gunnar.cc wrote:
AndrewMcHorney wrote:
I looked at the documentation for this function and I find it confusing.
Try File::Finder for a less confusing interface to *the module* File::Find.
snip
Huh, never looked
opendir(), readdir() and grep().
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
the code is compiled so it is
*not* re-run every time through the loop. is very wrong.
Yep, that's it. John, honestly I thought that you had made a 'typo', and
that my little snippet would be sufficient to call your attention to it.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
them?
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
and the
HTML::TokeParser docs.
Also, if there are two dropdowns and the second is a dependent of the
first e.g. select size then select availabe colors; how do i count
the total possible combinations of those two options?
Sounds like simple math to me.
--
Gunnar Hjalmarsson
Email: http
\n;
'
1
$
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
John W. Krahn wrote:
Gunnar Hjalmarsson wrote:
John W. Krahn wrote:
my() happens when the code is compiled so it is *not* re-run every
time through the loop. The assignment happens when the code is run
so it is re-run every time.
$ perl -e '
for (1..5) {
my $count;
$count += 1
John W. Krahn wrote:
Gunnar Hjalmarsson wrote:
John W. Krahn wrote:
Gunnar Hjalmarsson wrote:
John W. Krahn wrote:
my() happens when the code is compiled so it is *not* re-run every
time through the loop. The assignment happens when the code is run
so it is re-run every time.
$ perl -e
question. Just wanted to mention
that you basically do that with references.
perl -le '
$y = green;
$x = \$y;
$$x = red;
print $y;
'
red
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail
ought to be implicitly localized to the loop.
http://perldoc.perl.org/perlsyn.html#Foreach-Loops
OTOH, I believe it's advisable to always my() declare loop variables,
even if there happens to be a global variable with the same name.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin
Chas. Owens wrote:
On Wed, Apr 29, 2009 at 19:07, Chas. Owens chas.ow...@gmail.com wrote:
On Wed, Apr 29, 2009 at 18:44, Gunnar Hjalmarsson nore...@gunnar.cc wrote:
snip
You are encouraged to include a patch also when submitting a bug report - I
did so in the above example, btw - so I still
Chas. Owens wrote:
On Fri, May 1, 2009 at 10:18, Gunnar Hjalmarsson nore...@gunnar.cc
wrote:
I agree that perldiag says all that needs to be said. But a common
way to work with perldiag is to look up cryptic error or warning
messages when needed rather than using the diagnostics pragma
really useful in my case.)
Though I bet people will be confused in cases like
perl -Mstrict -e 'local $var = 4'
because quite a few people think local $foo is a declaration.
I for one don't see how a more informative error message could hurt.
--
Gunnar Hjalmarsson
Email: http
Chas. Owens wrote:
2009/4/28 Gunnar Hjalmarsson nore...@gunnar.cc:
snip
I believe the standard response is patches are welcome. grin
Are they? The number of open or new bugs at http://rt.perl.org/rt3/Public/
makes me fear something else.
( I did submit a bug report a few weeks ago:
http
Chas. Owens wrote:
On Wed, Apr 29, 2009 at 17:20, Gunnar Hjalmarsson nore...@gunnar.cc wrote:
Chas. Owens wrote:
2009/4/28 Gunnar Hjalmarsson nore...@gunnar.cc:
snip
I believe the standard response is patches are welcome. grin
Are they? The number of open or new bugs at
http://rt.perl.org
Perl requested me to do.
$ perl -Mstrict -e'$var='
Global symbol $var requires explicit package name at -e line 1.
Execution of -e aborted due to compilation errors.
$
The wording of that error message isn't very well thought out. :(
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin
Jenda Krynicky wrote:
From: Chas. Owens chas.ow...@gmail.com
On Tue, Apr 28, 2009 at 13:38, Gunnar Hjalmarsson nore...@gunnar.cc wrote:
snip
Fully qualified names do not trip strict. Which is a reason to avoid
using them. I once work at a place that wrote Perl 5 as if it were
still Perl 4
on the Services.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
Stanisław T. Findeisen wrote:
Gunnar Hjalmarsson wrote:
Stanisław T. Findeisen wrote:
Hi how to write regular expressions matching against Unicode (eg.,
UTF-8) strings?
For instance, in my regexp:
qr/^([.@ \w])*$/
Decode the UTF-8 encoded strings before applying the regex on them.
$ perl
host my website simply not have the library?
That seems odd. It's kind of basic, isn't it?
Even if libwww-perl is not among the standard modules, I believe it's
included in most Perl distributions.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail
Stanisław T. Findeisen wrote:
Gunnar Hjalmarsson wrote:
What assumptions does Perl make regarding input file (i.e., the
program/script file) encoding?
AFAIK, it just converts the bytes into Perl's internal format, but it
does not assume anything (at least not by default) with respect
Gunnar Hjalmarsson wrote:
Stanisław T. Findeisen wrote:
With use utf8 (http://perldoc.perl.org/utf8.html) one can however
make them parsed (decoded) (provided they are valid UTF-8).
No. The utf8 pragma is about allowing UTF-8 encoded *symbols*, e.g.
variable names or subroutine names
.
Looks like with use utf8 those string literals aren't ordinary byte
strings anymore. Perhaps they are as if Encode::decode had been applied
to them?
Yes, it seems to be so. Please also see my reply to Chas.'s post.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
Chas. Owens wrote:
On Wed, Apr 22, 2009 at 15:25, Gunnar Hjalmarsson nore...@gunnar.cc wrote:
snip
Yeah, it looks so. With use utf8 (http://perldoc.perl.org/utf8.html) one
can however make them parsed (decoded) (provided they are valid UTF-8).
No. The utf8 pragma is about allowing UTF-8
R. Hicks wrote:
Are there any gotchas for using qx() to run system commands versus
backticks?
No, it's the same thing.
http://perldoc.perl.org/perlop.html#qx/STRING/
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr
something else. Such mistakes makes me doubt the quality of
those modules.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
UTF-8, $utf8_encoded;
print Match if $s =~ /^\w+$/;
'
Match
$
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
the @EXPORT working.
Try
import Util;
instead.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
be very specific
about what you have tried, which error messages you get etc. These
general guidelines about asking questions on technical lists and
newsgroups may be useful:
http://www.catb.org/~esr/faqs/smart-questions.html
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
Chas. Owens wrote:
On Sun, Apr 12, 2009 at 21:58, Gunnar Hjalmarsson nore...@gunnar.cc wrote:
Chas. Owens wrote:
my @rank = qw/ 2 3 4 5 6 7 8 9 10 J Q K A /;
my @rank = qw/A 2 3 4 5 6 7 8 9 10 J Q K A /;
--^
snip
That depends on who you play with.
Ok.
Also, if you
http://httpd.apache.org/docs/2.0/ssl/
AFAIK, MySQL is not an HTTP server configuration thing.
(Do you have a Perl question?)
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h
Gunnar Hjalmarsson wrote:
Raheel Hassan wrote:
I am facing problems in executing cgi programs, on Apache web server, can
any body tell me how i can configure my Apache server so that it can
support
CGI and Msql. I also wanted to enable ssl support in the Apache server.
http
to do that?
Is that even possible?
I doubt it.
I suggest you check out the Games::Poker::HandEvaluator module at CPAN.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h
Chas. Owens wrote:
my @rank = qw/ 2 3 4 5 6 7 8 9 10 J Q K A /;
my @rank = qw/A 2 3 4 5 6 7 8 9 10 J Q K A /;
--^
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e
the install failed the first time,
but have you installed the htmldoc program?
To retry, I believe you first need to remove the
HTML-HTMLDoc-0.10-8rfFZS directory.
HTH
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
ANJAN PURKAYASTHA wrote:
I have a file stored at a location: http://parent_dir/file
Which among gazillion LWP options can I use to download and store the file
on my machine?
use LWP::Simple;
getstore('http://parent_dir/file', 'file');
--
Gunnar Hjalmarsson
Email: http
it:
use LWP::Simple;
my $url = 'http://parent_dir/file';
my $local = '/path/to/local/file';
my $file = getstore($url, $local);
getstore() returns the HTTP status code, so 'file' is not the most
appropriate name of a variable to which the return value is assigned.
--
Gunnar Hjalmarsson
Email: http
There is no reason in this case to use the character, and most Perl
programmers today would say that
which_element_is(dan, @names);
is the preferred 'normal' way to call a function.
(Others have answered the question you asked.)
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
my $fh, '', $file or die Opening $file failed: $!;
my @lastnames;
while ( $fh ) {
my @line = split /\t/;
chomp @line; # if the record has no further elements
push @lastnames, $line[1];
}
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
Data::Dumper to extract values from it when you'd
better just say:
my $nick = $message-{who};
my $str = $message-{body};
Hopefully that hint helps you move forward.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr
Rick Bragg wrote:
I need a quick regex to strip out the following:
Never heard of that. What is a quick regex?
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h
. The other mistake is your use of single
quotes around the ISBN.
$ perl -MBusiness::ISBN -le '
$isbn = Business::ISBN-new(0-59610-206-2);
print $isbn-as_string;
'
0-596-10206-2
$
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr
Randal L. Schwartz wrote:
Gunnar == Gunnar Hjalmarsson nore...@gunnar.cc writes:
Gunnar Martin Spinassi wrote:
Is there any way to open a file for input and output at the same time?
Gunnar Yes. Open it with the '+' MODE.
Gunnar open my $fh, '+', $file or die Couldn't open $file
Chas. Owens wrote:
There is also the ongoing danger of putting untrusted file names in
@ARGV[4],
$ perl -we undef @ARGV[4]
Scalar value @ARGV[4] better written as $ARGV[4] at -e line 1.
$
Maybe your previous footnote style was better after all. ;-)
--
Gunnar Hjalmarsson
Email: http
;
truncate $fh, 0;
print $fh @keep;
http://perldoc.perl.org/functions/open.html
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
message with an appended ad,
probably with varying content inside the p/p pair. If that's the
case, it's probably not a disaster if it would fail occasionally, and a
simple substitution may be sufficient:
s,(.+)p.+/p,$1,is
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
for the
message headers, there are a few things to consider.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
Nigel Peck wrote:
Gunnar Hjalmarsson wrote:
Nigel Peck wrote:
I'd appreciate hearing (reading!) people's thoughts on making web
form data safe for using to compose an email via sendmail.
Basically, see comments in pseudo-code below, what should I be doing
to the data to make it safe
reply).
Sounds pretty safe to me.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
The NNTP interface to this list (and possibly other @perl.org lists)
seems not to work any longer. Does anybody know what the problem is? Is
it a temporary thing, or has the service been permanently disabled?
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
Randal L. Schwartz wrote:
Gunnar == Gunnar Hjalmarsson nore...@gunnar.cc writes:
Gunnar The NNTP interface to this list (and possibly other @perl.org lists)
seems not
Gunnar to work any longer. Does anybody know what the problem is? Is it a
temporary
Gunnar thing, or has the service been
Chas. Owens wrote:
On Sat, Mar 14, 2009 at 17:49, Gunnar Hjalmarsson nore...@gunnar.cc wrote:
snip
Unfortunately not. I tried again a couple of minutes ago; nothing
downloaded. :(
Well, I'll stick to emails for the time being.
snip
Does the following work?
telnet nntp.perl.org 119
is somewhat above your head
for the time being? Maybe you'd better take a step back and improve your
Perl skill?
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http
monnappa appaiah wrote:
Gunnar Hjalmarsson wrote:
monnappa appaiah wrote:
Im sorry for starting the new threadi tried to
understand the solution but i couldn't understand much from it, i
have used the used eval to trap errors but after that i couldn't
understand as i'm new to perl
)* for the failures. Apply the
solution you were given in the other thread.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
not using back reference, are there a better way?
I would do:
if ( $a =~ /\.(?:html|jpg)$/i )
Please read http://perldoc.perl.org/perlretut.html and other appropriate
docs.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr
Dr.Ruud wrote:
Gunnar Hjalmarsson wrote:
Dr.Ruud wrote:
Gunnar Hjalmarsson wrote:
eval { $ssh2-connect($_) };
if ($@) {
warn Unable to connect host $_: $@ and next;
}
That is the old fashioned way. You really need to use the return
value of eval to make sure.
I
.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
,],
},
);
This is how you now can get the link_int values for core3:
print $_\n for @{ $hostnames{core3}-{link_int} };
Suggested reading:
http://perldoc.perl.org/perldsc.html
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr
Dr.Ruud wrote:
Gunnar Hjalmarsson wrote:
monnappa appaiah wrote:
This the error i'm getting
Net::SSH2::connect: failed to connect to 10.10.10.1:22: Unknown error at
connect.pl line 21
the line 21 is shown below
$ssh2-connect($_) or warn Unable to connect host $_\n and next;
It's
?
Probably a bug in the code. ;-) Which measures have you taken to try to
find the bug?
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
output had
you expected?
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
in my Perl installation is:\n,
$bytes bytes\nor\n , sprintf('%.1f', $bytes/1024**2),
MiB\n;
C:\hometest.pl
The acc. size of the files in my Perl installation is:
90529266 bytes
or
86.3 MiB
C:\home
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
Gunnar Hjalmarsson wrote:
Dermot wrote:
snip
This will only give you the top level of directories:
07/02/2009 14:00DIR .
07/02/2009 14:00DIR ..
07/02/2009 14:00DIR bin
15/03/2006 22:14DIR eg
07/02/2009 14:00DIR html
15/03
?
http://search.cpan.org/search?query=session
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-cgi-unsubscr...@perl.org
For additional commands, e-mail: beginners-cgi-h...@perl.org
http://learn.perl.org/
sys...@wowway.com wrote:
I'm trying to use an XML pretty printer called xmlpretty ...
http://groups.google.com/group/comp.lang.perl.misc/browse_thread/thread/5407c504591e0c4e
Do not multi-post!!
http://lipas.uwasa.fi/~ts/http/crospost.html
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc
ramesh.marimu...@wipro.com wrote:
How to set env variable? I'm using PERL in WINDOWS.
My question phrasing may be wrong.
Actually my question is I need to run Perl from anywhere from my system.
s/env variable/PATH/
Type
help path
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc
Jerald Sheets wrote:
In your code you can specify the directory location of the pm:
use lib '/path/to/pm';
That makes no sense. It would cause Perl to look for
/path/to/pm/XML/Handler/YAWriter.pm
and the module would not be found.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi
Jerald Sheets wrote:
Gunnar Hjalmarsson wrote:
Jerald Sheets wrote:
In your code you can specify the directory location of the pm:
use lib '/path/to/pm';
That makes no sense. It would cause Perl to look for
/path/to/pm/XML/Handler/YAWriter.pm
and the module would not be found.
Note
=~ /(.{1,40}.*?(?:\s|$))/g ) {
my $part = $1;
push @parts, MIME::QuotedPrint::encode($part, '');
}
join \r\n\t, map { =?$enc?Q?$_?= } @parts;
}
The resulting output is:
=?UTF-8?Q?Sm=C3=B6rg=C3=A5sbord?=
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi
right curly to end the while loop.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
::SSH2, and warn()
and next() are not run. The standard solution to this problem is eval():
eval { $ssh2-connect($_) };
if ($@) {
warn Unable to connect host $_: $@ and next;
}
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail
if lc $normal eq 'yes' or lc $normal eq 'no';
http://perldoc.perl.org/functions/grep.html
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
;
use constant {
MY_FIRST_CONSTANT = 'hello world!'
};
use Exporter;
our @EXPORT = qw/MY_FIRST_CONSTANT
$MY_SECOND_CONSTANT
routine1
/;
#...@export_ok would be better
In this case there is only one package. Would you still bother with
Exporter? Why?
--
Gunnar
().
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
$line = join ',', @{ $record[0] };
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
.
Do you want to do the normal thing? [yes] :
print 'Do you want to do the normal thing? [yes] : ';
chomp( my $normal = STDIN );
$normal ||= 'yes';
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
Chas. Owens wrote:
On Fri, Feb 27, 2009 at 11:07, Gunnar Hjalmarsson nore...@gunnar.cc wrote:
Sarsamkar, Paryushan wrote:
I would like to accept some user inputs (using STDIN), but it might be
easier for a user if I can provide the default value, so that they just
have to press ENTER.
How can
, $value;
push @cookie_values, $value if $name eq 'var';
}
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-cgi-unsubscr...@perl.org
For additional commands, e-mail: beginners-cgi-h...@perl.org
http://learn.perl.org/
1 - 100 of 1008 matches
Mail list logo