https://www.youtube.com/watch?v=xhAoN7g-xLs
That is another attempt to reach you. Please try again if I haven't yet.
I'm disappointed there has been no feedback yet.
I know that it's off-topic, but at least yell at me for that, geez. :)
Regards,
--
Brandon
ssion because of its relationship to
linguistics and software. Though I dare not try to send it their
way directly without a push (and maybe a direction).
Feedback, constructive or otherwise, is welcomed and encouraged.
Regards,
Brandon McCaig <
bamb...@castopulence.org>
Ca
Sorry for the noise. This reply was intended for on-list, but
apparently I'm a bit rusty and hit the wrong key.
On Tue, Oct 30, 2018 at 02:41:46PM -0400, Brandon McCaig wrote:
> On Tue, Oct 30, 2018 at 07:34:11AM -0500, Rick T wrote:
> > Still, if anyone can point me to a “begin
tents = do {
local $/ = undef; # Temporarily set read record separator
<$file_handle>; # to undefined to slurp the whole file.
};
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bambams.ca/>
perl -E '$_=q
,
> next => sub {
> print "tick...\n";
> $_[KERNEL]->delay(next => 1); # ***
> },
> });
It appears that delay() is a standard method that can trigger an
event after some amount of time.
Regards,
--
Brandon
hing you need to
build and install most Windows-compatible CPAN modules.
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bambams.ca/>
perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }.
q{Vg qbrfa'\''g nyjn
=~ /window/i) {
print "Contents of file.txt matched window.\n";
}
Even though a lexical file handle will automatically be closed
when it goes out of scope it's still a good practice to manually
close it and check for errors.
close $fh or warn "close: $!";
Re
gramming API to save yourself such low-level headaches. The
code to deal with sockets robustly is complicated and that wheel
already exists in several forms. Check CPAN for something more
appropriate.
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Bl
ial that
> I'm overlooking, or a bug somewhere in perl / Net::Server.
That's a reasonable route to take. Be sure to let us know if you
do get private help so that we know to stop. :)
I'll attempt to look at the files from your latter E-mail, but
without having a complete program to w
ge have to this program?
Note also that you appear to be sending HTML E-mails (see the
Internet for why that's evil), which could also potentially mean
that what I'm reading in plain text isn't exactly what you
intended to send... It all depends on your MUA. You may gain some
comfort know
data stream is encoded (and that is completely out of my
> control). But there must be a adequate and proper way to
> handle this data.
I don't think the data stream is encoded overly whacky. I think
the problem is just that writing computer software is *hard*. It
takes a bit of exp
doesn't. You may need to look for that terminating
sequence in the middle of the buffer.
You could use Data::Dumper and/or various poor-man's debugging
techniques to try to identify the problem here. You could write
what you read to a file and inspect that file with a hex editor
afterw
On Mon, Aug 10, 2015 at 10:41:12AM -0400, Brandon McCaig wrote:
> I'm afraid that I'm not familiar with OWP so please forgive my
> ignorance.
Errr, OPW*.
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bambams.ca/&
the basic cpan
command.
P.S., Consider configuring your mail client to send E-mails in
plain-text format. This helps to preserve formatting of messages
and especially source code, even for those of us that are reading
from text-based interfaces. It's also a generally good netiquette
and preferre
On Tue, Aug 4, 2015 at 5:06 PM, Brandon McCaig wrote:
> my %prev = (1 => { kids => \@output });
Perhaps a more adequate identifier for this hash would have been
%parents. *shrugs*
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/
On Sat, Aug 1, 2015 at 12:39 PM, Simon Reinhardt wrote:
> Am 30.07.2015 um 20:42 schrieb Brandon McCaig:
>> I'll give you my 2 cents for whatever that's worth. >:)
>
> Thanks for your many comments.
>
> The updated full project code is below. Feedback is appr
ing } and elsif ... lines. Again, it's a
style thing, but if you're already going half-way towards sharing
a line I don't see the harm in going all the way. ;)
$string =~ s/\\(.)/
if ($1 eq "\\" or $1 eq "\"") {
$1;
e from the language.
And I can't imagine anything that would break it. It's probably safe
assuming you can require such a modern perl.
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bambams.ca/>
perl -E '$_=
On Fri, Jul 17, 2015 at 10:40 AM, Brandon McCaig wrote:
> for my $i (0..4) {
Errr, 0..3. >_>
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bambams.ca/>
perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }.
q{
200.220/baz',
},
'15/Jul/2015:10:30:03 +0200' => {
ip => '1.0.0.127',
action => 'GET http://1.0.0.127/foo/bar',
},
);
my $ip_logs = transform_date_logs_to_ip_logs(\%date_logs);
for my $ip (sort { cmp_ip_addresses() } @ip_addresses
problem. I suspect the issue here is lexical
scope combined with the lack of strict, but it could be any number of
things.
It also appears as though you're trying to write a square HTML parser
of sorts. I'd suggest using one of the CPAN modules that already exist
for this purpose. Don't
in qr// the i is added back to the pattern. Without
it is left off. The modifiers on the m// won't have any affect to the
enclosed pattern.
An alternative solution is to include the modifier directly in the
regex by prefixing it with (?i). For example, if the patterns are
dynamic (user-suppli
to do unit
conversions then I didn't have much success searching for a
module that contained the logic for that. That doesn't mean one
doesn't exist, but I failed to find it.
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <http://ww
sugar around `require' (plus some
stuff), which is like syntactic sugar around `do' (plus some stuff).
require is the one checking the return value of the module code and
raising an exception on falsy values.
perldoc -f use
perldoc -f require
perldoc -f do
Regards,
--
Brandon McCaig
On Tue, May 19, 2015 at 1:10 PM, Brandon McCaig wrote:
> 1234567890Richard:
Sorry, that should have been just "Richard:". I will blame my flaky
browser-based user interface. I should have switched to mutt to write
that.
Regards,
--
Brandon McCaig
Castopulence So
'm not saying this is a better or more robust solution than hacking
it up in bash, but at least by using Perl you have the full power of
Perl without switching between bash, grep, awk, and perl.
The Interwebz suggests that checking /proc would be a better solution,
though that would vary by t
On Thu, Apr 16, 2015 at 10:56:22AM -0400, Brandon McCaig wrote:
> /*or use foreign key if you wish*/ "content" AS target_type,
Doh! That should have been the same as the second part of the
union:
> b.target_type_id AS target_type,
Regards,
--
Brandon McCaig
Casto
position,
a.link_text,
b.target_type_id AS target_type,
c.script_id AS target_id
FROM navigation a, target_type b
INNER JOIN html_navigation c
ON a.navigation_id = c.navigation_id
WHERE b.name = 'script';
Untested. Meant purely to illustrate the idea. Let me know if you
have an
s people have already proposed good directions
to go. We rarely venture into the higher-level Perl here (not that
it's unwelcome either), though there are many other Perl-based mailing
lists to consider that may go into more advanced usage.
Regards,
--
Brandon McCaig
Ca
ode it is always a
good idea to post the code you're struggling with. It's a little
bit difficult to understand what you were having trouble with,
but if you had posted code then there would have been several
anxious persons able to spot the problem and rushing to be the
first to reply. :)
Reg
;t figure out any way to control the CHECK
parameter used by PerlIO. The weird thing is that the
documentation appears to assert that PerlIO is supposed to be
using Encode::FB_CROAK() (1) too, but alas I guess that isn't the
case if it doesn't croak().. That or the PerlIO layers are
ca
NAME'
so there may also be cases where you'd want to use `do' instead,
but most of the time use is more appropriate, and less often
require is more appropriate.
For the detailed explanation take the time to read through the
following:
perldoc perlmod (search for BEGIN)
perldoc -f u
If there's a programmer that you work with that
is responsible for this then bring him coffee or beer and he'll
gladly fix you up.
Or worst case, if the guy responsible is long gone perhaps you
could attach a zip file or tarball of all of the code that you
have and a kind, bored sou
::lib" which is a similar idea.
Or just copy the file to one of the paths already listed and get
on with your day. :) Hope that helps. Let us know if it works.
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bambams.ca/>
perl -E
tware. I use perlbrew to
install both up-to-date perl and cpanm.
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bambams.ca/>
perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }.
q{Vg qbrfa'\''g nyjnlf fbhaq gung jnl.};
tr/
whether
that path exists. It is merely there to resolve a relative path into
an absolute path. You might do so in order to create a new file with
that path, and then tell the user what that full path is so there is
no ambiguity. If it were to die() when that path didn't exist it would
be imp
rp with the chomp option and joining the lines
afterward though.
I suppose there's always Benchmark.pm to give you a hint about
what works better if it matters.
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bambams.ca/>
perl -E &
On Tue, Jan 20, 2015 at 10:21 AM, Brandon McCaig wrote:
> perldoc -f qr//
I was sure that worked in my up-to-date perlbrew environments, but it
isn't working in Cygwin running perl 5.14.2 so in the event that it
doesn't work for you look at `perldoc -f qr' and `perldoc perlop
ession's being text I think the only other
solution is restructuring the program... You can look into using
Benchmark.pm to compare the performance of different approaches.
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bambams.ca
x27;m any
authority on this problem. :\
[1] http://meta.stackexchange.com/questions/66377/what-is-the-xy-problem
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bambams.ca/>
perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }.
q{Vg qbr
me: $!";
return \@insults;
}
sub random_insult_chain {
my ($insults) = @_;
my @words = map random_insult_word($_), @$insults;
return @words;
}
sub random_insult_word {
my ($insult_column) = @_;
my $i = get_random_index @$insult_column;
my $word = $insult_column->[$i];
return $word;
}
__END__
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bambams.ca/>
perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }.
q{Vg qbrfa'\''g nyjnlf fbhaq gung jnl.};
tr/A-Ma-mN-Zn-z/N-Zn-zA-Ma-m/;say'
signature.asc
Description: Digital signature
l -Mwarnings -e 'my @x = (1..10); print @x[4], "\n";' said:
> Scalar value @x[4] better written as $x[4] at -e line 1.
> 5
And with that, it should be emphasized to always use the strict
and warnings pragmas. :)
Regards,
--
Brandon McCaig
Castopulence Software &
t; }
> close $fh or die "could not close $file: $!\n";
> }
>
> get_columns( 'insults2.txt' );
>
> for ( 1 .. $MAX ){
> my @line = (
> @first[rand(@first)],
> @second[rand(@second)],
>
Bdr
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bambams.ca/>
perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }.
q{Vg qbrfa'\''g nyjnlf fbhaq gung jnl.};
tr/A-Ma-mN-Zn-z/N-Zn-zA-Ma-m/;say'
signature.asc
Description: Digital signature
On Tue, Jan 13, 2015 at 10:40:46PM -0500, Brandon McCaig wrote:
> to spend some quality time with The Revelant Manuals (TFM).
I cite this as proof that I am TFT (too fucking tired). I'm not
going to confess how proud I was of this word play before I
realized that it was completely non
my $filename = $_->[0];
return $filename;
}
my @files = readdir($dh);
my @reg_files = grep \&my_filter, @files;
my @file_tuples = map(\&my_mapper, @reg_files);
my @sorted_tuples = sort \&compare_mtimes, @file_tuples;
my @sorted_files = map \&extr
mention that support for arrays was added in 5.14
along with references? Hopefully I got that right this time. :)
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bambams.ca/>
perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }.
q{Vg q
lues", and "sort".
Your usage should not depend on 5.14.
Starting with 5.14, the EXPR passed to each() can be a reference to an
array or hash instead of the data structure themselves, which will be
automatically dereferenced. I believe that is the only bit of the
functionality that
ng the pipe succeeded, but the exit status was
# non-zero.
my $signal = $child_error & 127;
my $status = $child_error >> 8;
handle_pipe_exit($signal, $status);
} else {
# One or more system calls failed when attempting to
# close th
rl does or something that the C
runtime or OS is doing for us. In Windows you should be able to
experiment with tee(1) in the middle and/or binmode on either or
both ends of the pipe anyway.
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <http:/
n you can just use print
normally.
use strict;
use warnings;
$\ = "--->";
print for qw/foo bar baz/;
__END__
Output:
foo--->bar--->baz--->
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bamccaig.com/&
l get a lot
more help from us by showing us something.
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bamccaig.com/>
perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }.
q{Vg qbrfa'\''g nyjnlf fbhaq gung jnl.};
tr/A-Ma-mN-Zn-z/N-Zn-zA-Ma-m/;say'
signature.asc
Description: Digital signature
appers for
networking in Perl to save yourself the trouble of reinventing
the square wheel. YMMV. Raw socket access or experience shouldn't
really be necessary if using one of the higher-level wrappers so
you can spare yourself the nightmares if all you need is
networking. :)
Regards,
--
Brandon M
A few corrections on my part...
On Sun, Dec 28, 2014 at 04:35:49PM -0500, Brandon McCaig wrote:
> > sub func1{
> > say "About to run shared function!";
> > $anon_func->("func1");
> > }
Oh, duh, there is func1 right there. :\ OK, that part makes
out a little contrived example to figure this out
myself:
./program:
#!/usr/bin/env perl
use strict;
use warnings;
use Safe;
my $sandbox = Safe->new();
$sandbox->permit(qw/print/);
# Shared variables cannot be lexicals!
our $get_id = do {
my $id = 0;
sub {
my ($base) = @
x27;]*)'/g;
(Untested)
See documentation on m// and /g.
If you want something to actually do parsing I have heard that
Text::Balanced <https://metacpan.org/search?q=Text::Balanced> is a
good direction to go, but I can't say for sure whether it will solve
this prob
Perl).
There is also an Archive::Any that claims to work as a magical
dispatcher to automatically do the right thing for supported formats.
You could try that, though again I don't know if it would support raw
gzip files that don't contain tarballs.
If you still need help let us know what y
lly the system perl
(e.g., /usr) is asking for trouble or at least pains too simply
because you either need root (see above) or need to do magic to not
need to, and typically it is out-of-date (though Ubuntu may keep it
more up-to-date than other distros, I believe that is still several
releases back).
On Fri, Nov 28, 2014 at 9:40 AM, Brandon McCaig wrote:
> # Protip: I'm not sure which is better, interpolating $status
> # into the format string, or passing it as an argument. I'm
> # sure it's negligible in this case.
> printf "<%-60s> $sta
my $filename = $_;
unless(is_editor_garbage($filename)) {
return;
}
unless($force || confirm_unlink($abs_path)) {
report($abs_path, 'skipped');
return;
}
unlink_file($abs_path);
}
> }
>}
> }, @trgs
> );
I&
because they can't be. It's not a problem with a
perfect solution. The best option is to have the machine or user that
is giving you data also tell you what the format/text encoding of it
is. A simple way to do this is to implement a command-line option in
your program (e.g., see Getopt::
ers are
read. Perhaps that will shed some light on the issue. Or not...
What you really need is a specification for the data that you're
reading. If you don't know what you're reading then it's
basically impossible to properly read it.
Regards,
--
Brandon McCaig
Castopulence Softw
user input):
> bash$ perl example
> ';echo Sneak attack!;echo '
> First pipe:
> Second pipe:
> ls: cannot access ';echo Sneak attack!;echo '
> : No such file or directory
> ls: cannot access : No such file or directory
> Sneak attack!
WHOA,
stead though, see my next point.
> exit;
Rather than exit()ing from a subroutine, it is often better to
either return a value indicating failure (e.g., boolean or error
status) or die() instead. This lets the caller decide if they
want to give up or do something else. Not only ca
only have a simple
program that will become a single Web page that just needs to run
and generate some simple HTML output then it might well be easier
to just hack up a CGI program and wire it up with whatever Web
server is currently available. Your mileage may vary... And of
course, there are m
ly. However, just throwing everything into a single
structure accomplishes nothing.
That said, you can take references to data in Perl and pass those
instead. The idea is very similar to pointers in C or references
in C++. You could do this to avoid the overhead of copying the
structure
last;
> }
> '
> Exiting subroutine via last at -e line 8.
Touché. :) Apparently I left out strict and warnings from my
one-liners and carelessly translated them into strict programs
without verifying... :-[ Thanks for catching my mistakes.
Nevertheless, it still works, bu
the
wrong subroutine.
Using parenthesis as John specified solves the problem; or by
alternatively using say() instead of print(), which automatically
writes a newline after writing the arguments. say() is only
available in non-ancient perl's and only available when enabled
(typically by -E or u
nstructs and
they are not compatible. And it's a good thing because I find
that hypothetical syntax quite difficult to read.
Using English terms, what you're attempting to say is more like:
"Stop here if we've iterated thrice write 'if' tracing message."
Obviou
benefit the code any. They're certainly helpful to jump
several levels in a clean way. though I wouldn't oppose using a
goto for that in languages that lack labelled
next/last/continue/break statements. >:)
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castop
ake install
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bamccaig.com/>
perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }.
q{Vg qbrfa'\''g nyjnlf fbhaq gung jnl.};
tr/A-Ma-mN-Zn-z/N-Zn-zA-Ma-m/;say'
signature.asc
Description: Digital signature
least
give you an easy button to jump right in, which is ideal for
beginners). If you're new to Linux then you'll have that hurdle
to climb first, but in the long run I think it'll balance out...
Good luck. :)
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopu
mers to avoid waste, but not if it
comes at the expense of reliability, security, or robustness.
Using my() and our() takes very little effort and is well worth
the investment.
/rant
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <http://www
and he plans to release it soon as
"mature". So maybe keep an eye out for that too.
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bamccaig.com/>
perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }.
q{Vg qbrfa'\'
$arg;
>}
>
>return $READLIMIT;
> }
Looks like it raises an exception if the argument doesn't match a
NON-"digit" character. Which seems like the opposite of what is
wanted.
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/&
ine, so the additional one that you're
writing there is likely causing duplicates in the output. And for
future reference, non-ancient versions of Perl have a say()
alternative to print() that appends a newline for you.
> close(WRITE) || die "Unable to close $write_file: $!\n";
> close(READ) || die "Unable to close $file: $!\n";
> }
> }
>
> 1;
If that isn't enough to figure out your problem then I think
you're going to have to take another shot at explaining what it
is that you're trying to achieve, and what you're getting
instead. Many of us will not have the aforementioned book so you
should try to explain it to us assuming no external knowledge.
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bamccaig.com/>
perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }.
q{Vg qbrfa'\''g nyjnlf fbhaq gung jnl.};
tr/A-Ma-mN-Zn-z/N-Zn-zA-Ma-m/;say'
signature.asc
Description: Digital signature
at will
work on all possible HTML inputs). You're far better off learning
to use one of the HTML parsing modules because that will give you
a reliable mechanism to process HTML data.
If you just want to learn how to use split then by all means go
for it. Just don't expect to get meaning
On Wed, May 01, 2013 at 11:45:00AM -0400, Brandon McCaig wrote:
> One thing that I know bit me with the 'or die' pattern is that
> with a pipe if the child process exits with an non-zero exit
> status then close returns undef, ...
Sorry, close returns false to signal
t;/bin/true"; close $fh;'
# This fails with the same error you get.
perl -Mautodie -E 'open my $fh, "-|", "/bin/false"; close $fh;'
So perhaps this is a bug in autodie, or perhaps you should just
not use autodie with close and a pipe... I guess a work around
should be to disable it for the close:
use autodie;
open my $fh, "-|", "/bin/false";
{
no autodie qw/close/;
close $fh or $? != 0 or die "close: $!";
}
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bamccaig.com/>
perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }.
q{Vg qbrfa'\''g nyjnlf fbhaq gung jnl.};
tr/A-Ma-mN-Zn-z/N-Zn-zA-Ma-m/;say'
signature.asc
Description: Digital signature
On Thu, Apr 18, 2013 at 07:26:13AM -0300, Brian Fraser wrote:
> On Wed, Apr 17, 2013 at 10:24 PM, Brandon McCaig wrote:
> > Using the warnings pragma is good! You should also use the strict
> > pragma:
> >
> > use strict;
> >
> >
> This is not neede
e strict;
> use DateTime::TimeZone;
>
> my $tz = DateTime::TimeZone->new( name => 'Europe/Lisbon' );
> my $date = DateTime->now();
> print $date;
Looks to me like the problem is that you're not specifying the
time zone for DateTime::now. Try this:
On Mon, Apr 08, 2013 at 01:07:13PM -0400, Brandon McCaig wrote:
> use Data::Dumper;
> use Encode;
I should note that neither of these packages were used in the
example program that I posted and aren't required for it to run.
:) They were just remnants from debugging...
Regards,
what purpose JSON::XS::utf8 is intended
to serve. It sounds to me like when enabled it expects the input
data structure to be binary (UTF-8 encoded data). I'm not sure
under what circumstances you'd want hash keys to be in binary
when you could instead just decode the data from where eve
ible on the Web. And the spam could be unrelated to the list
anyway. Anybody could have passed your E-mail address along until
it found its way to a spammer's bot. Just avoid replying to any
spam messages, and avoid fetching any URLs found within them
(make sure your mail client doesn't d
a',997));
>
>
> Here is my output:
> Use of uninitialized value $exit_status in hash element at user.pm line 31.
> $VAR1 = {
> 'std_err' => 'no error output produced',
> 'std_out' => \*Symbol::GEN1,
> &
installing 'YAML'. ;)
bash$ cpan YAML
HTH.
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bamccaig.com/>
perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }.
q{Vg qbrfa'\''g nyjnlf fbhaq gung jnl.};
tr/A-Ma-mN-Zn-z/N-Zn-zA-Ma-m/;say'
signature.asc
Description: Digital signature
On Wed, Mar 20, 2013 at 10:22:04AM -0400, Brandon McCaig wrote:
> Is it possible that it's not running bash, and
> therefore your .bash_profile is not being sourced, and therefore
> the Perlbrew environment is not being set up?
Nevermind...
On Tue, Mar 19, 2013 at 11:42:56AM -0700,
applicable to your
situation, but you never know... :)
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bamccaig.com/>
perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }.
q{Vg qbrfa'\''g nyjnlf fbhaq gung jnl.};
tr/A-Ma-mN-Zn-z/N-Zn-zA-Ma-m/;say'
signature.asc
Description: Digital signature
gs to make sure that
doesn't happen accidentally (and avoid doing it intentionally).
Thanks to the warnings pragma we do get a warning about it, but
that can be surpressed, and regardless the damage may be done
already.
See perldoc -f eval and perldoc warnings.
Regards,
--
Brandon McC
On Sun, Mar 10, 2013 at 11:06:14AM -0400, Brandon McCaig wrote:
> There is no array here. There are only lists. See perldoc
> perldata.
>
> > List value constructors
> > List values are denoted by separating individual values
> > by commas (and enclosing th
Protip: you should stay on list for this. :) Cc'ing the list.
On Sun, Mar 10, 2013 at 11:16:50AM +, John Delacour wrote:
> On 09/03/2013 20:57, Brandon McCaig wrote:
> >You cannot have anonymous arrays in Perl except by reference.
>
> What about this?
>
> for (spli
'One',
> 'Two'
> ]
> ];
> One Two
I do not see the point you are trying to make. You created a
named array, stuffed an anonymous array ref into it, and then
printed its elements out (in a somewhat odd way). What does this
demonstrate?
its author
felt it does more i.e., is more featureful. I haven't used the
latter myself.
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bamccaig.com/>
perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }.
q{Vg qbrfa'\''g nyjnlf fbhaq gung jnl.};
tr/A-Ma-mN-Zn-z/N-Zn-zA-Ma-m/;say'
signature.asc
Description: Digital signature
nce. That is, [] gives you a
reference to an anonymous array.
my @named_array = (1,2,3);
my $anon_array_ref = [1,2,3];
my @named_array_copy_of_anon_array = @$anon_array_ref;
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bamccai
ot;;
Good catch. :) I didn't think that open worked with a pipe and
LIST, but apparently it does now. It must have been an older Perl
that screamed at me, I guess. Thanks for pointing it out.
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <h
On Thu, Mar 07, 2013 at 10:05:56AM -0500, Brandon McCaig wrote:
> Apparently Windows supports 32-bit integers... The Web suggests
> that if you want to get full 32-bit integers on Windows then you
> should use the Win32::Process module instead of open. It's not
> portable, but at
hen you
should use the Win32::Process module instead of open. It's not
portable, but at least it will do what you need.
Note: 55028 & 255 = 244. So what is happening is the original
exit code is being truncated down to one byte.
Regards,
--
Brandon McCaig
Castopulence Software <ht
or referencing. I had to look it
over several times and have faith in you before I figured out how
it is meant to work.
> do_something_with_line($line);
> }
> }
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.ba
from .bash_profile yourself:
# .bash_profile:
source .profile
Results may vary from UNIX-like to UNIX-like, but not by much.
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bamccaig.com/>
perl -E '$_=q{V zrna gur orfg jvgu jung
ot;Please see my test email",
> ],
> attributes => {
> encoding => 'quoted-printable',
> charset => 'ISO-8859-1',
> content_type => 'text/html'
> },
> body_str => @email_body,
1 - 100 of 299 matches
Mail list logo