If you go the e-mail route for signalling, you can have Perl scripts on
both ends using Crypt::OpenPGP to sign and/or encrypt the commands.
Other options like XMPP were mentioned. Maybe one of the MQTT modules
would be suitable.
/Lars
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
to
burdensome desktop operating systems which when combined with
inefficient, monolithic IDEs reduce overall productivity substantially
while conveying an illusory /feeling/ of getting work done.
/Lars
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail
your colleagues will be reading it as well, for various reasons.
So if you emphasize readability, you will help everyone out including
your present and future self through the processes of both creation and
maintenance.
My 2 ¢ €
/Lars
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.or
solve?
/Lars
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
On 1/26/20 9:58 AM, Lars Noodén wrote:
> I've got a long script that has "use utf8;" near the top. The script
> parses some HTML and then I run into trouble when printing the result as
> shown below:
>
> use utf8;
> use HTML::TreeBuilder::XPath;
&
does not object to 99% of the material I've run it over daily for
months but something, somewhere in a recent file is causing the wide
character problem. It's also causing it to mangle the UTF-8 parts.
How do I get the HTML::TreeBuilder::XPath module to use UTF-8 all the
way through?
/Lars
CentOS 7 which I can add?
/Lars
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
nal handling code
> https://www.perl.com/article/37/2013/8/18/Catch-and-Handle-Signals-in-Perl/
Is this something which should be handled differently in the module itself?
/Lars
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h..
feeds and their formats or contents. So, are
there instead any recommendations on how I can have perl trap the error
or otherwise prevent malformed XML from bringing the whole program to a
halt?
Thanks,
Lars
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-m
7;#!/usr/bin/env perl'
in a production environment though. But overall, it answers the
questions I had.
Regards
Lars
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
xample, is the 'use warnings;' pragma better than launching with
-w? Same for launching perl via '#!/usr/bin/env perl' rather than
'#!/usr/bin/perl' instead? What about a leading whitespace like with
'#! /usr/bin/perl' instead of '#!/usr/bin/perl'
w+ \s+ \? /x
Regards
Lars
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
Ok. Thanks, Paul and David.
I think I see how I can benefit from Text::Balanced but I now have my
start with PPI and can list the expressions.
Regards,
Lars
#!/usr/bin/perl
use strict;
use warnings;
use PPI;
use Data::Dumper;
my $file = shift or ( die("Need a file name!\n") );
my
?
Regards,
/Lars
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
ge.
>
> Thanks in advance.
> Kavita
>
Once you have acquired the page using either WWW:Mechanize, LWP, or even
just wget you can extract the table.
The modules HTML::TreeBuilder and HTML::TreeBuilder::XPath do extraction
rather easily if there is some consistent way to identify the
e the former references the latter in the manual page, it
*might* be better but where would I look for empirical evidence of that
guess?
Regards,
Lars
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
trigger something to cause it being processed as
unicode. Further it says that communication anything outside of the
current Perl process is done in binary. So, if I am using read() to get
a span of binary data, it should not only come in as binary but also
stay as binary while I work with it, rig
On 04/03/2016 02:42 PM, Shlomi Fish wrote:
> Hi Lars and all,
>
> On Thu, 31 Mar 2016 11:38:44 +
> Duncan Ferguson wrote:
>
>> Lars,
>>
>> I believe 'unpack' is the right way to go, you just need to get the template
>> right ('N' in
and
so on?
Regards,
Lars
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
On 03/13/2016 02:14 PM, Peter Scott wrote:
> On Sat, 12 Mar 2016 18:44:18 +0200, Lars Noodén wrote:
[snip]
>> What modification can prevent zombies yet allow multiple concurrent
>> clients to attach?
>
> You need the WNOHANG option on your wait() to make it nonblocking
or waitpid() seem
to be available to use to stop that, but if I insert either of them in
the outer while loop, only one client can connect at a time.
What modification can prevent zombies yet allow multiple concurrent
clients to attach?
Regards,
Lars
-
while ( my $client = $serv
If I have the code below to fork a child process, how would the right
way be to fork as a different user? I gather that fork() itself does
not support that, so some other method must be used.
Regards,
Lars
-
#!/usr/bin/perl
use strict;
use warnings;
use English;# for $UID and such
my
Or a one-liner would work, if the replacement above really is what you want:
perl -pi.orig -e 's/Debug/Error/g;' filter.txt
The old file will be named filter.txt.orig and the new file with the
substitutions will be filter.txt
See the manual page for perlrun(1) for the details of the options e, i,
and p.
Regards,
Lars
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
I need to bulk edit the metadata in a large number of JPEG files. Which
is the best CPAN module to help with that? Would it be Image::ExifTool ?
Regards,
Lars
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http
On 10/19/2015 07:40 PM, Kent Fredric wrote:
> On 20 October 2015 at 03:55, Lars Noodén wrote:
>> What is the main reason for the preference of File::Slurper over
>> File::Slurp these days?
>
>
> http://blogs.perl.org/users/leon_timmermans/2015/08/fileslurp-is-broke
rper over
File::Slurp these days?
Regards,
/Lars
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
the C routine "yubikey_crc16" from "ykcrc.c" at
https://github.com/Yubico/yubico-c/blob/master/ykcrc.c
can generate such a checksum.
How can I get the same result from the module Digest::CRC?
Regards,
Lars
< CODE >
#!/usr/bin/perl
use strict
On 06/02/2015 01:18 PM, Shlomi Fish wrote:
> Hi Lars,
>
> please reply to all recipients.
>
> On Tue, 02 Jun 2015 12:54:54 +0300
> Lars Noodén wrote:
>
>> I have a calculated variable $otp which is decrypted using AES key $key.
>> If the variable was properly
gards,
Lars
#!/usr/bin/perl
use strict;
use warnings;
use Convert::ModHex qw(modhex2hex);
use Crypt::Rijndael;
my $input = qq(ujvrgjnigiibvrjctcflercebvcvhicbnhhheliclnfh);
my $key= qq(83b396b8f996fa1be3dafdc3f0eefc21);
my $userid = qq(aa6d0a6e8a65);
my ( $publicid, $otp ) = ( $
Parser::Simple, or XML::TokeParser. The latter would be only
if the input is valid, well-formed XHTML.
TokeParser can be used to find a table within a specific div.
Regards,
/Lars
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.or
On 07/17/2014 05:16 PM, Uri Guttman wrote:
> On 07/17/2014 09:02 AM, Lars Noodén wrote:
>> Or maybe something like this in perl itself?
>>
>> perl -ne 'print @{[split(/\s+/,)]}[-1],qq(\n);' file
>
> much earlier in this thread there were one liner examp
it(/\s+/,)]}[-1],qq(\n);' file
Regards,
/Lars
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
On 03/18/2014 12:39 PM, Anant kumar wrote:
> Dear Lars Nooden,
>
>I am finding difficulty in
> installing the Program. Can you please take a look and advice me the
> solution.
>
>
>
> Sincerely yours,
> Anant Kumar
>
eas about how to
approach the task.
Regards,
/Lars
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
tch. Since the
copyright notice in the module is 10 years old, where should a patch be
sent?
Regards,
/Lars
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
te normal in certain latitudes
during some parts of the year and I'd like to quiet the error messages
that result from using the module.
regards,
/Lars
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
nd up handling this with a regex.
Thanks. Putting binmode at the beginning of the script fixed the output
without needed regex.
binmode(STDOUT, ":utf8");
Regards,
/Lars
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
target URL is
http://en.ilmatieteenlaitos.fi/weather/rovaniemi
Regards,
/Lars
#!/usr/bin/perl
use warnings;
use strict;
use HTML::TokeParser;
use LWP::Simple;
my $url = shift || '-';
my $weather = get( $url );
my $p = HTML::TokeParser->new(\$weather) or
die "Ca
t you're running afoul of that...
>
> j.
>
Ok. Thanks. I'll look more closely there for the difference. I missed
the restrictions on using placeholders. It may apply in more situations.
Regards,
/Lars
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For addition
;);
$sth->execute( $interval );
What mistake is there causing the error? I can use a similar line with
a placeholder for a SELECT sql statement without error.
Regards,
/Lars
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
the other
modifiers are already there and they belong all together. The two s///
modifiers, /e and /r, should be at least named in that group at least as
one-line summaries.
Regards,
/Lars
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
rogramming Perl", 4th ed, pp 186,
254-255.
Where should suggestions for corrections be sent?
Could something like the text below be added?
Regards,
/Lars
$ diff perlre.pod perlre.pod.orig
108,113d107
< =item e
< X
<
< Treat the replacement portion as an interpreted expression.
< E
tr eq " "){ print $str conatins
> nothing\n";}
Try this:
if (!defined $str || $str eq "") { ... }
Almost but not quite the same:
if (!$str) { ... }
Here the block will also be executed if the value of $str is 0.
--
Lars Haugseth
"If anyone disagrees with anyth
I'm using a news
reader to post this reply.
The messages can also be read by anyone with a web browser:
http://www.nntp.perl.org/group/perl.beginners/
--
Lars Haugseth
"If anyone disagrees with anything I say, I am quite prepared not only to
retract it, but also to deny under oath that I ever said it." -Tom Lehrer
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Hi,
> if ( ref $self ) {
thanks to Todd and JupiterHost - that was quick and helpful!
Lars
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
a bit dirty to me ...
sub get_defaults {
my $self = shift;
$self = undef if ($self eq 'Example::Package');
if (defined($self))
}
Is there a cleaner way to find out, if the sub was called as an object method
or as a static sub?
thanks,
Lars
--
To uns
= readdir LOGDIR) {
next if $_ =~ /^\./;
$_ = "$logdir/$_";
if ((stat($_))[9] > (stat($root_auth_keys))[9]) {
print "stat: ", (stat($_))[9];#debug
print "stat: ", (stat($root_auth_keys))[9]; #debug
Finding files that matches "*.jpg" recurse. And getting the answer as a
list.
Well that is not how to do it
$files = system("find /mnt/flash -name \"*.jpg\" ");
print "$files";
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
48 matches
Mail list logo