> Thanks,
> Luca
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
quot;aa" is followed by a
> "a" isn't something the expression prohibits. If you want that
> try /^a{,2}$/ instead.
>
> Regards,
> /Karl Hammar
>
>
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
program faster?
>
> Perl is the fastest, taking 1.9s. Ruby is the second fast, taking 3.0s.
> Scala script is the slowest, taking 4.0s.
>
> Maybe I can use a algorithm but what?
>
> --
>
> With kindest regards, William.
>
> ⢀⣴⠾⠻⢶⣦⠀
> ⣾⠁⢠⠒⠀⣿⡁ Debian - The unive
t; I am boring and tired
>
> *I must be a success!*
>
> PD: Add your anecdote with this language.
>
> --
>
> With kindest regards, William.
>
> ⢀⣴⠾⠻⢶⣦⠀
> ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
> ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
> ⠈⠳⣄
>
>
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
s. At the begin of the perl program the is no "use
> ".
>
> --
>
> fr.gr.
>
> Freek de Kruijf
>
>
>
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
>
> With kindest regards, William.
>
> ⢀⣴⠾⠻⢶⣦⠀
> ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
> ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
> ⠈⠳⣄
>
--
Andy Bach
afb...@gmail.com
Not at my desk
/downloading-and-installing-perl-in-2021/
On Mon, Jul 4, 2022 at 7:53 PM Mr. Faiz Ul Haq Zia
wrote:
> Hello,
> Which one of the PERL distribution should I use on windows 11.
> regards
> Faiz ul haque Zeya
> Senior Associate professor BUKC
>
--
Andy Bach
afb...@gmail.com
Not at my desk
gt;> gifaninmation.pl line 12.
>> Exception 410: no images defined `Image::Magick::Q16HDRI' @
>> error/Q16HDRI.xs/XS_Image__Magick__Q16HDRI_Write/15195 at
>> gifaninmation.pl line 15.
>>
>
> According to this article I have installed * libpng *but the error is
> present.
> https://legacy.imagemagick.org/discourse-server/viewtopic.php?t=14301
>
>
>
> --
>
> With kindest regards, William.
>
> ⢀⣴⠾⠻⢶⣦⠀
> ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
> ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
> ⠈⠳⣄
>
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
$log "$PaddedDateStr $_";
>> }
>>
>> print $log "\n";
>>
>> close $log;
>>
>> sub pd {
>> my ($mon,$mday,$year,$hour,$min,$sec,$wday) =
>> (localtime(time))[4,3,5,2,1,0,6];
>> $year -= 100; ## gives 2 digit (with %02d)
>> $mon += 1;
>>
>> my $PDS = sprintf "%02d%02d%02d:%02d%02d%02d %d",
>>$year,$mon,$mday,$hour,$min,$sec,$wday;
>> return $PDS;
>> }
>> --- --- ---=--- --- ---
>> At first glace, looks like $log was used instead of instead of $fh.
>>
> Ken
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
"); close OUT ;my $res = print OUT "hi mom\n"; say $res; sleep
10'&
[1] 36594
print() on closed filehandle OUT at -e line 1.
Use of uninitialized value $res in say at -e line 2.
$ kill -SIGPIPE 36594
pipe
$
On Thu, Sep 30, 2021 at 5:20 PM hw wrote:
> On Thursday
t; error message and there isn't anything I could do about it.
>
> https://perldoc.perl.org/functions/print says that 'print' would return
> true
> if successful and doesn't say what it returns otherwise. It also says
> that
> "Printing to a closed pipe or socket will generate a SIGPIPE signal."
>
> So I tried to install a signal handler, but either I did that wrong, or no
> signal was generated. What can I do?
>
>
>
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
ated?
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
rp';
>
> I get the following result:
>
>
> city Brussels
>
>
> But also in such a case I want to get
>
>
>
> city Brussels
>
>
>
> Is there a way to get this result in such a case?
>
>
> --
> Kind regards,
cript started from console work like a charm
>
> Good day,
>
> HS
>
> --
>
> Regards,
> Condor
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
ew();
>unless ($p->ping($host)) {
>$p->close();
>return 0;
>}
> }
>
> 1;
>
> package main;
>
> A::mytest('www.google.com');
>
> print B::mytest('www.google.com');
>
>
>
> When I run it, always get:
&g
't get the good
> > result with one regex to match both lines.
> >
> > Can you help?
> >
> > Thanks,
> > Maggie
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
As an aside, Perl 5.10 and up, you can get the "say" command by
enabling extended functions:
perl -E 'say "hi mom" '
hi mom\n
https://perlmaven.com/what-is-new-in-perl-5.10--say-defined-or-state
a
On Wed, Sep 4, 2019 at 1:08 PM Andy Bach wrote:
>
> >
s.
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
--
To unsubscribe, e-mail: beginners-unsubscr..
ybe.
It’d just be a mod you’d have to maintain. You could also go to cpan and
offer a suggestion to the author(s) or even a patch. TIMTOWTDI
On Thu, Aug 29, 2019 at 11:20 AM Lars Noodén wrote:
> On 8/28/19 7:33 PM, Andy Bach wrote:
> > Look at eval blocks - lets you trap fatal errors from ot
a->get($url);
> > if ($response->is_success) {
> > print $response->content;
> > } else {
> > die $response->status_line;
> > }
> > print "All done.\n\n";
> >
> > __END__
> >
> > Dumps the page or elevation depending on url:
> >
> > perl test.pl
> > > ?> > y="34.0">3DEP 1/3
> >
> arc-second916.71FeetAll
>
> > done.
> >
> >
> >
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
> --
Andy Bach
afb...@gmail.com
Not at my desk
le program to a
> halt?
>
> Thanks,
> Lars
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
> --
Andy Bach
afb...@gmail.com
Not at my desk
g in any
> coordinates or something else is needed.
>
> uri
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
> --
Andy Bach
afb...@gmail.com
Not at my desk
Yes, Perl 5 and Perl 6 are quite different in many ways. Some suggested that
Perl 6 be looked at as not the next iteration of Perl but a new language that
can be made backward compatible with Perl 5 (there are switches etc that let
you run P5 code unchanged) but it is not the case of P5 being a
rto wrote:
>
> dear Andy and all,
>
> I opened and read the apache error log. it said there is an invalid
> character. And I think there is a unicode character. My question is also
> how to pass a unicode data from mysql to a browser through JSON.
>
> in the mysql connection, I al
atement
> if( $params->{iSortingCols} ){
> $sql .= ' ORDER BY';
> foreach my $c (0 .. ( $params->{iSortingCols} -1 )){
> $sql .= ' ' . $columns[ $params->{"iSortCol_$c"} ] . ' ' .
> $params->{"sSortDir_$c"};
> $sql .= ','
> }
> $sql =~ s/,$//;
> }
>
> # Limit the output and also allow to paginate or scroll infinitely
> #print $table_length;
> $sql .= " LIMIT ? OFFSET ?";
> push @values, (($params->{iDisplayLength} > 0 ?
> $params->{iDisplayLength} : 25), ( $params->{iDisplayStart} // 0));
> print ($sql);
> # Fetch the data from the database
> $data = $dbh2->selectall_arrayref($sql, { Slice => [] }, @values);
> print ($data);
>
>
> # Return the JSON object
> print $q->header('application/json');
> my $json = encode_json({ aaData => $data, iTotalRecords => $count,
> iTotalDisplayRecords => $count, sEcho => int($params->{sEcho}) });
> #my $json = encode_json({ tableLength => $table_length, iTotalRecords =>
> $count, params=>$params, iTotalDisplayRecords => $count, sEcho =>
> int($params->{sEcho}) });
>
> print $json;
>
> $dbh2->disconnect();
>
> I tried to understand, by doing the inspect element, nothing appears in
> debugger.
>
>
> Please help
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
all comments you experienced people send me.
>> Thanks!
>>
>> Rick Triplett
>> --
>> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
>> For additional commands, e-mail: beginners-h...@perl.org
>> http://learn.perl.org/
>>
>>
>>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
x27;
Thu Jul 5 10:19:42 CDT 2018
$ date -d '10/17/18 12:28:12'
Wed Oct 17 12:28:12 CDT 2018
so, for epoch seconds
$ date -d '10/17/18 12:28:12' "+%s"
1539797292
$ date -d '05-JUL-18 10:19:42 ' "+%s"
1530803982
That's ignoring TZ
On Tue, No
.10.18 12:28:12,447849 +02:
>
> I created on regex : \d\d\.\d\d\.\d\d\s[012][0-9]:[0-5][0-9]:[0-5][0-9]
> this only matches : Calling apply.sql on 17.10.18 12:28:12,447849 +02:
>
> I need a common regex which matches both the lines ?
>
>
> Thanks,
> --
> Asad Hasan
> +91 9582111698
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
gt;>>> >
>>>>>> > DUP-05004: statement1
>>>>>> >
>>>>>> > DUP-05007: statement2
>>>>>> >
>>>>>> >
>>>>>> > LOG file opened at 02/23/18 01:10:33
&g
> so in this case file1 : Fri Feb 23 01:10:28 2018
>>>> >range file1 +2 mins :02/23/18 01:12:28
>>>> > check in file 2 nearest to file1 and within range : 02/23/18
>>>> 01:10:33
>>>> >
>>>> > how do i compare two timestamps in different format and within range
>>>> ?
>>>>
>>>> You would first convert the two timestamps to a common format,
>>>> preferably one that used a numerical value to express times. I know of two
>>>> such: the Unix epoch time that uses an integer to represent the number of
>>>> seconds since 1 Jan 1970 UTM and the Julian date that uses a floating-point
>>>> number to represent the number of days since 1 Jan 4713 BCE.
>>>>
>>>> Are you looking for a Perl solution or a Python one?
>>>>
>>>> For Perl, you should investigate time and date modules available on
>>>> CPAN, such as Date::Manip or Date::Calc.
>>>>
>>>>
>>>
>>> --
>>> Asad Hasan
>>> +91 9582111698
>>>
>>
>>
>> --
>> Asad Hasan
>> +91 9582111698
>>
>>
>
> --
> Asad Hasan
> +91 9582111698
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
ciated. I'm kinda stuck with using
> XML::LibXML though.
>
> John
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
egins with a letter
>
> (lower or upper) or a number up until you reach an
>
> hyphen sign (‘-‘).
>
> but it fails to match
>
> compat-libstdc++-33-3.2.3-71.el7.i686
>
> Please let me know what regex should i use to extract all 3
>
> rpms.
>
> Also let me know if there are web tools to build regex
>
> Good websites for regex tutorials.
>
> Thanks,
>
>
>
> --
> Asad Hasan
> +91 9582111698
>
>
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
$slurp;
> {
> local $/;
> open my $fh1, '<', $file_to_convert
> or die "Can't open $file_to_convert: $!\n";
> $slurp = <$fh1>
> or die "Could not slurp $file_to_convert: $!";
> $slurp =~ s/\r/\n/xmsg; # swap Mac's CR for LF
> $slurp =~ s/\x0b//xmsg; # swap Filemaker paragraph marker VT for
> html
> close $fh1;
> }
>
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
that the script is run relative to the current dir, not
the dir where the script resides. That is, I keep my scripts in
/usr/local/bin, so if I have a /home/andy/perl_lib full of my modules, I'd
want to
use lib '/home/andy/perl_lib';
In the previous command line examples:
$ cd
.) at -e line 1.
>
>
> Still got failed.
>
> Someone pointed to me that I should push @INC in BEGIN{}.
>
> $ perl -le 'BEGIN {push @INC,"./test"} use mytest'
>
> This works.
>
> So my question is what happens in BEGIN{} block?
>
> thanks.
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
want to match:
>
> /path/
> /path/123
> /path/abc
>
> but /path/?xxx should not be matched.
>
> This works:
>
> $ perl -le '$x="/path/abc"; print 1 if $x=~m{path/\w+}'
> 1
>
>
> this works too:
>
> $ perl -le '$x="/path/?a
gt; my $hyphen = $2;
> $student_number = $3;
> die "$student_surname, $hyphen, $student_number”;
>
> Rick Triplett
>
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
t;;
> my $tt = Template->new(
> ect.
>
> Many thanks!
> Rick Triplett
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
in gvim and do :as
>
> it reports the characters as
>
> 251, Hex 00fb, Octal 373
> 252, hex 00fc, Octal 374
>
> However, when I try to seacch for it using
>
> if ($line=~/[\xfb|\xfc]/) {
>
> or even just
>
> if ($line=~/\xfb/) {
>
> it always fails. What am I doing wrong?
>
> Gary
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
ser to get around the
policy. But your urls so far have shown some odd repsonse using wget so
you may want to check them out first before your script has at them.
On Tue, Feb 13, 2018 at 2:34 PM, Manfred Lotz wrote:
> On Tue, 13 Feb 2018 13:50:55 -0600
> Andy Bach wrote:
>
> > $ wg
59.6KB/s in 0.6s
2018-02-13 13:42:55 (59.6 KB/s) - ‘OFL’ saved [37439]
so it may not be following the 302s. I'm not sure you're using the correct
tool here. A little more straight forward
andy@wiwmb-md-afb-mint:~/spam$ wget http://scripts.sil.org/robots.txt
--2018-02-13 13:47:2
line 8.
>
>
> However, firefox shows the site works ok.
>
>
> What am I doing wrong?
>
>
> --
> Thanks,
> Manfred
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
timestamp comparisons will be accurate. If there's a possibility
> that they won't be the same, then I'll need to convert them so that they
> will be the same.
>
> Thanks,
> Frank
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
an set to add libraries (maybe in the
webserver config).
On Thu, Dec 7, 2017 at 5:29 PM, SSC_perl wrote:
> > On Dec 7, 2017, at 3:09 PM, Andy Bach wrote:
> >
> > Can you not look a the web server's error_log? A 500 error would put
> the perl error msg in there. Have you t
; Thanks,
> Frank
>
>
>
>
> #!/home/user/perl5/perlbrew/perls/latest/bin/perl
>
> use v5.26;
> use warnings;
> use diagnostics;
>
> print "Content-type: text/html\n\n";
> say 'Perl '. $^V;
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
>
>> I see this:
>> http://www.perlmonks.org/?node_id=1104517
>>
>> I also see that escaping it with my ActiveState Perl
>> messes up it's function entirely, but still allows it
>> to run with no errors so I say this is a huge
>> problem. Seems like the migration to Perl 5.30 is going to
>> be interesting to say the least.
>>
>> Anybody have any other comments about this?
>>
>>
>> Mike Flannigan
>>
>> --
>> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
>> For additional commands, e-mail: beginners-h...@perl.org
>> http://learn.perl.org/
>>
>>
>>
>
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
m after?
>
> Thanks,
> Frank
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
ified action.
> error: undef returned by _untaintDir on cwd at
> /Location/lib/Archive/Zip/Archive.pm
> line 754
> Archive::Zip::Archive::addTree('Archive::Zip::Archive=HASH(0x1113ceee8)',
> '/Location/patch1//')
>
>
> Seems to me a permission issu
de::encode_utf8( chr(182) ) eq pack( 'H*',
'C2B6' );
}, "\n";
print "s: ", scalar eval { Encode::encode_utf8( chr(182) ) eq pack(
'H*', 'C2B6' );
}, "\n";
print "s: ", Encode::encode_utf8( chr(182) ) eq pack( 'H*', 'C2B6'
) , "\n";
printf("c: %c %s\n", chr(182), pack( 'H*', 'C2B6' ) );
$ perl /tmp/r.pl
r: Encode::XS=SCALAR(0xb39ff0)
r: Encode::XS
r: Encode::XS
r:
s: 1
s: 1
s: 1
c: ¶
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
st5\n"'
Use of uninitialized value $interdest5 in numeric eq (==) at -e line 1.
Use of uninitialized value in numeric eq (==) at -e line 1.
i:
Hah! "undef" is an uninitialized value !
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
x27;}}; # or otherwsie do it in list
> context it works
>
> print @subject;
>
>
> when I run it, I do not get anything.
>
> please help.
>
> regards,
> Eko
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
s a subroutine prototype
(see perldoc perlsub) saying "no parameters" while the second allows the
same thing but doesn't enforce it via a prototype. I believe there's a way
to turn on warnings but have it ignore prototype mismatches, if that'd
help. I'd have to googl
7;group3' => '10.100.27.54',
'group4' => '10.100.27.55',
'group5' => '10.100.27.56',
'group6' => '10.100.27.57' #Last element has no comma...
'group7' => '10.100.27.57' #Last element has no comma...
};
and now you have a syntax error. You can leave the last element's comma,
Perl will basically ignore it in building the hash (or array)
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
On Wed, Jan 6, 2016 at 9:46 AM, Dermot wrote:
> You could try the `which` command if you are using a *nix based OS. For
> instance;
>
> >which perl
> /usr/bin/perl
>
and, to go a little further, as /usr/bin/perl is the most likely and so
it's probably the 5.005 version, you could look at /usr/lo
On Fri, Nov 6, 2015 at 11:56 AM, Andy Bach wrote:
> Uxix is actually a misspelling it'd be "Unix"
>
...
> So you can just drop the qw-ed name list.
Heh heh ... or leave it in (the idea being to limit the imported names into
your namespace ... or something) as
beginner with perl). So, assuming
> there is no typo or bug in the script will someone
> please point me toward a source that explains what
> is (or isn't) happening here.
>
> BTW, I'm using perl5 version 20 subversion 2 on Ubuntu 15.10
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
foreach my $file (@files) {
# generate XML here
if(-d "$dir/$file" and ($file !~ /^\.\.?$/)
) {
# make dir branch
Traverse("$dir/$file");
rg
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
al Communication with Yourself" in perlipc
You may also use the IPC::Open3 module (part of the standard perl
distribution), but be warned that it has a different order of arguments
from IPC::Open2
(see IPC::Open3).
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
ng the following to the anon sub:
...
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
in the README something like (well,
once it was like this, been a while since I've done it):
$ perl Makefile.PL
$ make
$ make test
$ sudo make install
but copying, unless it really is just a single file, won't work. In the
above case, you'd need to at least copy the file IxHash.pm t
n zero (which'd be
"mkdir" there):
---y
"yanks" and puts that space separated word from the previous cmd.
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
. The output separator variable ($\ aka $OUTPUT_RECORD_SEPARATOR)
will change what print appends to the end of each print stmt. Default is
undef (which is where the v6 "say" comes in). You'll have to do the work
yourself
$contents =~ s/\n+/ /g; # change all into one line - single
on into your
> >> Perl community, please point your newbies at geekuni.com
> >>
> >> To make them feel even more welcome, this coupon
> >>
> >> PM2015
> >>
> >> will give them a 15% discount on their first month.
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
te sequence. Though I get the same output for:
$ perl -e '{ local $\ = "\n"; print "hi" }' | perl -ne "print( ord($_),
qq{ }) foreach split(//)"
104 105 10
on, Mac, windows and Linux.
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
he win there isn't just sharing the code but the return from the error
> handler goes back to the user's caller and not to a sub in the module.
>
Yes, that would be useful too. I must have forgot that aspect of "&" calls
;->
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
}
I was thinking this would be a neat place to show the remaining reason for
using "&" to mark a function call - it sends the current "@_" to that
function, but I couldn't get it to work.
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
l5/vendor_perl/5.8.8/x86_64-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl
/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .).
BEGIN failed--compilation aborted.
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
uct/9780596001735.do
[2]
quoted here:
http://www.perlmonks.org/?node_id=809543
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
quot;, "array context" or, for that matter,
plain old "context" but ..
--
a
[1]
perl -we 'my $s_e = ("x", "y", "z")[1]; print "$s_e\n"'
same as:
perl -we 'my $s_e = qw(x y z)[1]; print "$s_e\n"'
and:
perl -we 'my ($s_e) = qw(x y z)[1]; print "$s_e\n"'
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
at -e line 1.
Odd number of elements in hash assignment at -e line 1.
Use of uninitialized value in concatenation (.) or string at -e line 1.
[2]
http://stackoverflow.com/questions/7427381/what-do-you-get-if-you-evaluate-a-hash-in-scalar-context
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
od things about Padre as a Perl IDE which can be
used w/ any distro. I'm a vim user myself so take this all w/ a grain of
NaCl2 but brian d foy and Damien C. recommend it:
http://damienlearnsperl.blogspot.com/2009_09_01_archive.html
others
http://theory.uwinnipeg.ca/CPAN/perl/pod/perlfa
s/(\w+, \s+ \d+ \s+ \w+ \s+ \d+ \s+ [\d:]+) ([+-]\d+/$1 $2/xms )
warn("Fixed bad date str $_\n");
}
either after Date::Parse has failed (and so retry) or a test before, just
in case.
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
t; Can't create temporary file.
>
That's likely a permissions problem; either the tmp file location doesn't
exist or is owned/group/permed (on a linux box) to a configuration that
won't let the user running ScanStream to write there.
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
gular-expression-to-match-e-mail-addresses
"Mastering Regular Expressiong" (O'Reilly - J. Freidl) is a wonderful book
and he's got an RE in there that tries to handle the full RFC (5322?)
specification but he admits it's not perfect.
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
uot;} ;
my $upload = $global->{form}->{image_upload} ;
print "form: $upload\n";
$upload = $global->{fom}->{image_upload} ;
print "fom: $upload\n";
$ perl /tmp/h.pl
form: image
Use of uninitialized value in concatenation (.) or string at /tmp/h.pl line
9.
fom:
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
h elements, they get "undef".
An array in scalar context returns it's element count, so you can do:
if ( @test == 4 ) {
print "There's 4 things in \@test!\n";
}
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
tat($fname); print "yes\n" if ( -f _ and not
-l _ )'
yes
$ rm st
$ ln -s nohup.out st
$ perl -e '$fname = "st"; lstat($fname); print "yes\n" if ( -f _ and not
-l _ )'
$ perl -e '$fname = "st"; lstat($fname); print "yes\n" if ( -l _ and not
-f _ )'
yes
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
/www.preshweb.co.uk/ www.preshweb.co.uk/twitter
> www.preshweb.co.uk/linkedinwww.preshweb.co.uk/facebook
> www.preshweb.co.uk/cpanwww.preshweb.co.uk/github
>
>
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
# same thing, but less efficient
eval '$answer = $a / $b'; warn $@ if $@;
# a compile-time error
eval { $answer = }; # WRONG
# a run-time error
eval '$answer =&
gger($category)" method to obtain a reference to the
one and only possible
logger object of a certain category. That's called a singleton if
you're a Gamma fan.
and so:
#$logger->get_logger('LOG2');
$logger = Log::Log4perl->get_logger('LOG2');
seems to work.
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
_player = $6;
";
}
else {
print "failed to match\n";
}
gets:
# perl -w /tmp/d.pl
found:
H = H;
K53 = K53;
deloresg = deloresg;
Bills = Bills;
Hank99 = Hank99;
Pellinor = Pellinor;
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
#x27;s not
just Perl REs but he covers and compares many other languages. It's also
funny, as in LOL!
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
g - just need
to have the last line be the one that returns your expected list. I'm
guessing there's something more to the process here.
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
define vars there
BEGIN {
our $server_path = "/opt/app/web/support";
chdir $server;
}
use lib "$server_path";
and have them available elsewhere. Not sure it's a good idea though ;->
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
$debug = 10;
...
print "in <> loop: \$_=$_\n"
if $debug > 8;
just remember to set it to zero (not just:
my $debug;
which set it to undef) when you're done, to avoid warnings.
There are, of course, modules you can use to make this nicer, easier but ...
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
the reads
just for the jokes) try also:
http://feather.perl6.nl/syn/Differences.html#Sigils
http://feather.perl6.nl/syn/S02.html#Sigils
for the modern-er docs.
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
-f "@_" works if there's just one element. I prefer
my ($fname) = @_;
as it's easy to expand to add more params
my ($fname, $fsize_max) = @_;
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
o think we're losing clarity. Both have
arguments and, as it happens, both arguments have proponents in the design
of Perl committee (sometimes known as "@larry" ;-); only, for now, the
sigil constancy crowd has one. Maybe in P7 they'll've regained their
sigils, er, senses.
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
enius" some people weren't too thrilled but it was Perl ... I liked it,
after I understood it.
But now - here, ask Damian (search for sigil)
http://www.perl.com/pub/2001/05/08/exegesis2.html
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
an infinite
> loop, prompting for valid tokens, but even if valid ones are entered it
> continues. What am I missing?
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
7;s the 5th element ahead of time?
But it seems like there'd have to be something else involved that eliminates a
counter var.
a
Andy Bach
(608) 658-1890
Not at my desk
On Aug 8, 2013, at 8:05 PM, Michael Rasmussen wrote:
> And buggy, consider:
>my @timings ( 11, 22, 3, 14,
{
but that's sort of silly.
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
On Aug 6, 2013, at 7:09 AM, Peter Gordon wrote:
> I'm confused by this documentation.
> http://perldoc.perl.org/functions/use.html
> Does it mean that:
> use 5.12.0;
> automatically turns on "use strict;" ?
That's the way I read this
use VERSION also enables all features available in the reque
Nice article from the "Perl Maven"
http://perlmaven.com/strict
From the really useful newsletter
http://perlmaven.com/perl-maven-newsletter
a
Andy Bach
(608) 658-1890
Not at my desk
to have them rectify this.
error id: "bad_httpd_conf"
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
[^>]+)>/ ) {
$business_info{$1} = $2;# e.g. address => "Business Address"
}
} # while DATA
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
);
You can even use this same approach on the standard package-scoped
filehandles:
use IO::Handle;*# and later...*
*STDOUT->autoflush( );
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
se -i renames or deletes the original file
before creating a new file of the same name,
UNIX-style soft and hard links will not be preserved.
Finally, the -i switch does not impede execution when no files
are given on the command line. In this
case, no backup is made (the original file cannot, of course,
be determined) and processing proceeds
from STDIN to STDOUT as might be expected.
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
l quesiont p5p stands for Perl 5 Porters, the
list dedicated to those folks working/maintaining Perl v5 (until Xmas when
Perl 6 [1] is out ;-)
http://lists.perl.org/list/perl5-porters.html
A list for people interested in Perl5 core development. High volume.
--
a
[1]
"I Didn't say which
1 - 100 of 249 matches
Mail list logo