Re: A Philosophical Point To Be Made: The Truth

2021-10-19 Thread Brandon McCaig
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 McCaig < b

A Philosophical Point To Be Made: The Truth

2021-10-16 Thread Brandon McCaig
use 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> Castopulence

Re: data structure for Template Toolkit

2018-10-30 Thread Brandon McCaig
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 “beginn

Re: local and auto flush

2018-05-29 Thread Brandon McCaig
= 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{V zrna gur orfg jvgu jung V fnl. }

Re: Write a plugin for an IRC bot

2016-03-22 Thread Brandon McCaig
> 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 McCaig <bamcc...@gma

Re: Perl executable problem...

2015-11-13 Thread Brandon McCaig
hing you need to build and install most Windows-compatible CPAN modules. Regards, -- Brandon McCaig <bamcc...@gmail.com> <bamb...@castopulence.org> Castopulence Software <https://www.castopulence.org/> Blog <http://www.bambams.ca/> perl -E '$_=q{V zrna gur orfg jvgu jung

Re: Multi line file handling

2015-10-19 Thread Brandon McCaig
ts 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: $!"; Regards, -- Brandon McCaig <bamcc...@gmail.c

Re: Sockets getting stuck

2015-10-13 Thread Brandon McCaig
lf 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 <bamcc...@gmail.com> <bamcc...@castopulence.org> Castopulence Software <https://

Re: reading from socket

2015-09-18 Thread Brandon McCaig
hat'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 work with there's no guarantee I'll even be looking in the right ball park. Regards, --

Re: reading from socket

2015-08-12 Thread Brandon McCaig
, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org 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

Re: reading from socket

2015-08-12 Thread Brandon McCaig
how to do can go wrong. It would be helpful if you could show us a complete program that we could test for ourselves. If you can't share the whole thing then try creating a minimal example. We will figure this out...! Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org

Re: reading from socket

2015-08-11 Thread Brandon McCaig
write what you read to a file and inspect that file with a hex editor afterward. Alternatively, you could invoke perl's debugger with the -d flag and inspect the program state in real-time. Does any of that help? Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org Castopulence

Re: self Introduction

2015-08-10 Thread Brandon McCaig
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 bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software https://www.castopulence.org/ Blog http

Re: self Introduction

2015-08-10 Thread Brandon McCaig
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 preferred practice on many mailing lists such as this. Regards, -- Brandon McCaig bamcc...@gmail.com bamcc

Re: convert linear array to nested structure

2015-08-04 Thread Brandon McCaig
On Sat, Aug 1, 2015 at 12:39 PM, Simon Reinhardt si...@keinstein.org 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 appreciated. (you also find

Re: convert linear array to nested structure

2015-08-04 Thread Brandon McCaig
On Tue, Aug 4, 2015 at 5:06 PM, Brandon McCaig bamcc...@gmail.com wrote: my %prev = (1 = { kids = \@output }); Perhaps a more adequate identifier for this hash would have been %parents. *shrugs* Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software

Re: convert linear array to nested structure

2015-07-30 Thread Brandon McCaig
\r; } else { die Unknown escape sequence in '$string'; } } return $string } All of my suggestions are untested so copy-pasta chefs beware. :) Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software https

Re: To use signatures or not to use?

2015-07-22 Thread Brandon McCaig
such a modern perl. Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org 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

Re: Display a hash in the order of an array

2015-07-17 Thread Brandon McCaig
}) { my ($date, $action) = @{$entry}{qw/date action/}; print Date: $date, IP Address: $ip, Action: $action\n; } } __END__ Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software https://www.castopulence.org/ Blog http://www.bambams.ca

Re: Display a hash in the order of an array

2015-07-17 Thread Brandon McCaig
On Fri, Jul 17, 2015 at 10:40 AM, Brandon McCaig bamcc...@gmail.com wrote: for my $i (0..4) { Errr, 0..3. _ Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software https://www.castopulence.org/ Blog http://www.bambams.ca/ perl -E '$_=q{V zrna gur

Re: Use of uninitialized value $j in numeric eq (==) at myfile line 125

2015-07-03 Thread Brandon McCaig
modules that already exist for this purpose. Don't roll your own unless you really want square wheels. Feel welcome to post a real example if you want some real help with the real warning. Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software https

Re: problem with regex qr operator

2015-06-25 Thread Brandon McCaig
of what m// says (if your qr// is case-sensitive then so is the pattern embedded into m//, regardless of what applies to m// as a whole). Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software https://www.castopulence.org/ Blog http://www.bambams.ca/ perl -E

Re: perl function for byte to MB conversion

2015-05-25 Thread Brandon McCaig
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 bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software https://www.castopulence.org/ Blog http://www.bambams.ca/ perl -E '$_=q{V

Re: last statement in a package

2015-05-21 Thread Brandon McCaig
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 bamcc...@gmail.com

Re: Removing text

2015-05-19 Thread Brandon McCaig
On Tue, May 19, 2015 at 1:10 PM, Brandon McCaig bamcc...@gmail.com 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 bamcc...@gmail.com bamcc

Re: Removing text

2015-05-19 Thread Brandon McCaig
a module that looked like a drop-in replacement, but I would be surprised if nothing exists yet. Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software https://www.castopulence.org/ Blog http://www.bambams.ca/ perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }. q

Re: Inhomogeneous data in a database

2015-04-16 Thread Brandon McCaig
= 'script'; Untested. Meant purely to illustrate the idea. Let me know if you have any questions. Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software https://www.castopulence.org/ Blog http://www.bambams.ca/ perl -E '$_=q{V zrna gur orfg jvgu jung V fnl

Re: Inhomogeneous data in a database

2015-04-16 Thread Brandon McCaig
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 bamcc...@gmail.com bamcc

Re: Need Advice on Perl learning

2015-04-15 Thread Brandon McCaig
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 bamcc...@gmail.com bamcc

Re: split regex

2015-03-21 Thread Brandon McCaig
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. :) Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software https://www.castopulence.org/ Blog http

Re: catching utf8 errors

2015-03-14 Thread Brandon McCaig
().. That or the PerlIO layers are catching and handling the error differently... Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org 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

Re: Use vs Require with version number

2015-03-04 Thread Brandon McCaig
often require is more appropriate. For the detailed explanation take the time to read through the following: perldoc perlmod (search for BEGIN) perldoc -f use perldoc -f require perldoc -f do Then use `use' until you know you need something else. :) Regards, -- Brandon McCaig bamcc

Re: CONFIG_FILE

2015-02-20 Thread Brandon McCaig
attach a zip file or tarball of all of the code that you have and a kind, bored soul can attempt to make sense of it... Or somebody might offer their services in private for a fair rate if needed (I'm not sure how much of that is tolerated on the list). Regards, -- Brandon McCaig bamcc...@gmail.com

Re: can locate pm

2015-02-18 Thread Brandon McCaig
of the paths already listed and get on with your day. :) Hope that helps. Let us know if it works. Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software https://www.castopulence.org/ Blog http://www.bambams.ca/ perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }. q{Vg

Re: simple module install via CPAN not working.

2015-02-17 Thread Brandon McCaig
and cpanm. Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org 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

Re: question of what can respond to die [...]

2015-01-27 Thread Brandon McCaig
is so there is no ambiguity. If it were to die() when that path didn't exist it would be impossible to resolve non-existent paths, which would limit the function's usefulness. I hope that helps. Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software https

Re: Looping regexes against a list

2015-01-20 Thread Brandon McCaig
On Tue, Jan 20, 2015 at 10:21 AM, Brandon McCaig bamcc...@gmail.com 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

Re: Looping regexes against a list

2015-01-20 Thread Brandon McCaig
solution is restructuring the program... You can look into using Benchmark.pm to compare the performance of different approaches. Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software https://www.castopulence.org/ Blog http://www.bambams.ca/ perl -E '$_=q{V

Re: should this old forumulation still work?

2015-01-20 Thread Brandon McCaig
always Benchmark.pm to give you a hint about what works better if it matters. Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org 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

Re: Looping regexes against a list

2015-01-19 Thread Brandon McCaig
://meta.stackexchange.com/questions/66377/what-is-the-xy-problem Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org 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

Re: Parsing multi column files

2015-01-18 Thread Brandon McCaig
($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 bamcc

Re: Parsing multi column files

2015-01-18 Thread Brandon McCaig
){ my @line = ( @first[rand(@first)], @second[rand(@second)], @third[rand(@third)], ); print @line\n; } Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software https

Re: Parsing multi column files

2015-01-18 Thread Brandon McCaig
@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 bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software https

Re: How does opendir/readdir process files

2015-01-15 Thread Brandon McCaig
, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org 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

Re: How does opendir/readdir process files

2015-01-13 Thread Brandon McCaig
along with references? Hopefully I got that right this time. :) Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org 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

Re: How does opendir/readdir process files

2015-01-13 Thread Brandon McCaig
with The Revelant Manuals (TFM). Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org 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

Re: How does opendir/readdir process files

2015-01-13 Thread Brandon McCaig
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 nonsensical

Re: How does opendir/readdir process files

2015-01-09 Thread Brandon McCaig
structure themselves, which will be automatically dereferenced. I believe that is the only bit of the functionality that is dependent on Perl 5.14 (and as of 5.14, the automatic dereference was considered experimental; my Cygwin environment is still back on 5.14..). Regards, -- Brandon McCaig bamcc

Re: Get return value when running cmd like this

2015-01-05 Thread Brandon McCaig
the pipe. $! should be set appropriately. I don't # know if you can rely on the process having exited/died # or on the exit status being set. handle_pipe_exit_error($errno); } }; Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org Castopulence

Re: say,

2015-01-05 Thread Brandon McCaig
--- Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org 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

Re: say,

2015-01-05 Thread Brandon McCaig
) in the middle and/or binmode on either or both ends of the pipe anyway. Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org 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

Re: IO::Socket

2014-12-29 Thread Brandon McCaig
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 McCaig bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software https://www.castopulence.org/ Blog http://www.bamccaig.com/ perl -E

Re: Script for auto conf

2014-12-29 Thread Brandon McCaig
choice for this project. It supports many good existing technologies that can accomplish this well. Only you know what it is that you're trying to do so go ahead and try to do it. You will learn best by trying and you'll get a lot more help from us by showing us something. Regards, -- Brandon

Re: Anonymous functions and safe compartments

2014-12-28 Thread Brandon McCaig
Unsafe script got id $id!\n; __END__ Output should be: $ ./program Unsafe script got id foo_0! Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software https://www.castopulence.org/ Blog http://www.bamccaig.com/ perl -E '$_=q{V zrna gur orfg jvgu jung V fnl

Re: Anonymous functions and safe compartments

2014-12-28 Thread Brandon McCaig
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 sense. :) Or else: sub shared_func = sub

Re: parsing string output that isn't CSV, but similar; what module would parse these kind of key-value pairs?

2014-12-16 Thread Brandon McCaig
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 problem more precisely. Hope that helps. Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org

Re: Can't find EOCD signature Archive::Zip

2014-12-05 Thread Brandon McCaig
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 you're trying to do and we'll do our best to guide you to a solution. Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org

Re: Unable to install Net::IP

2014-12-02 Thread Brandon McCaig
-of-date (though Ubuntu may keep it more up-to-date than other distros, I believe that is still several releases back). Any help would be greatly appreciated! Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software https://www.castopulence.org/ Blog http

Re: why is if (! @ARGV) skipped

2014-11-29 Thread Brandon McCaig
On Fri, Nov 28, 2014 at 9:40 AM, Brandon McCaig bamcc...@gmail.com 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 $status\n, $abs_path; I lied

Re: why is if (! @ARGV) skipped

2014-11-28 Thread Brandon McCaig
to miss. printf EOF, $myscript; Purpose: Recursve through list of directories and search out all editor leavings (some~ .some.swp some.bak etc.), but also includes things like #some# or the like. Usage: %s dir1 dir2 ... dirN EOF (Untested) } Hope that helps. Regards, -- Brandon McCaig bamcc

Re: copy unicode (UCS-2) file

2014-11-26 Thread Brandon McCaig
). If you control the software you can also define that the data *must* be in a particular encoding (e.g., UTF-8) and just assume that it is. Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software https://www.castopulence.org/ Blog http://www.bambams.ca/ perl -E

Re: UTF8, UTF-8, utf8, Utf8 encoding blues

2014-11-10 Thread Brandon McCaig
impossible to properly read it. Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org 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

Re: (Possibly a terrible lamer) is `open' format wrong

2014-11-04 Thread Brandon McCaig
?! That, good sir, is very dangerous. Avoid destructive words while testing this. The documentation is good. Please read the entirety of `perldoc -f open', but in particular look for the LIST form of opening pipes. Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org Castopulence

Re: Make a sub routine return

2013-09-04 Thread Brandon McCaig
be root to run with this flag (-o) effectively.'; } } As Rob indicated, give us a more specific error if you still need help with your program (it's hard to speculate what is going wrong). If you want more code review then post a more complete program. Regards, -- Brandon McCaig bamcc

Re: Creating a Perl web site, how should I build this

2013-07-03 Thread Brandon McCaig
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 many ways to do it. Just take care to sanitize user inputs, whatever you do... Regards, -- Brandon McCaig bamcc...@gmail.com bamcc

Re: accessing variables in subroutines

2013-06-27 Thread Brandon McCaig
is very similar to pointers in C or references in C++. You could do this to avoid the overhead of copying the structure each time you pass it. See `perldoc perlref' for a start on how references work. Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software

Re: last

2013-06-25 Thread Brandon McCaig
... :-[ Thanks for catching my mistakes. Nevertheless, it still works, but it warns you about it if you enable warnings (and the subroutine call causes compilation to fail with strict subs). Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software https

Re: last

2013-06-24 Thread Brandon McCaig
for that in languages that lack labelled next/last/continue/break statements. :) Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org 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

Re: last

2013-06-24 Thread Brandon McCaig
have been possible to support such complexities in a language like Perl, and indeed Perl probably goes further than most languages in this regard, apparently it was decided not to go that far in this case. Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org Castopulence

Re: Tips or Tricks to print out tab-separated data?

2013-06-24 Thread Brandon McCaig
(typically by -E or use v5.010 [or whatever the first version is to include it] or some equivalent pragma). When you want to write lines that don't already contain a newline it is an ideal shortcut though. Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org Castopulence

Re: make and Makefile.PL

2013-05-28 Thread Brandon McCaig
Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org 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

Re: help with some code

2013-05-23 Thread Brandon McCaig
to climb first, but in the long run I think it'll balance out... Good luck. :) Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org 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

Re: problem with File::Util::readlimit

2013-05-09 Thread Brandon McCaig
keep an eye out for that too. Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org 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

Re: curiosity about the usage of my

2013-05-09 Thread Brandon McCaig
the investment. /rant Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org 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

Re: problem with File::Util::readlimit

2013-05-08 Thread Brandon McCaig
the opposite of what is wanted. Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org 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

Re: Lines written to a file are not contiguous

2013-05-07 Thread Brandon McCaig
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 bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software https

Re: split

2013-05-03 Thread Brandon McCaig
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 meaningful results when processing unpredictable HTML data. :) Give us more information if you want help. Regards, -- Brandon McCaig bamcc...@gmail.com bamcc

Re: Can't close filehandle

2013-05-01 Thread Brandon McCaig
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 bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software

Re: Can't close filehandle

2013-05-01 Thread Brandon McCaig
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 failure, not undef. close

Re: Current time with DST

2013-04-18 Thread Brandon McCaig
On Thu, Apr 18, 2013 at 07:26:13AM -0300, Brian Fraser wrote: On Wed, Apr 17, 2013 at 10:24 PM, Brandon McCaig bamcc...@gmail.com wrote: Using the warnings pragma is good! You should also use the strict pragma: use strict; This is not needed. Since 5.14, 'use VERSION' automatically

Re: Current time with DST

2013-04-17 Thread Brandon McCaig
= '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: my $date = DateTime-now(time_zone = $tz); Seems to work on my end. Regards, -- Brandon McCaig bamcc...@gmail.com bamcc

Re: perl unicode utf8 and JSON::XS

2013-04-08 Thread Brandon McCaig
that the behavior is by design and I have to assume that the module author(s) know more about Unicode in Perl than I do. :) Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software https://www.castopulence.org/ Blog http://www.bamccaig.com/ perl -E '$_=q{V zrna

Re: perl unicode utf8 and JSON::XS

2013-04-08 Thread Brandon McCaig
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, -- Brandon

Re: Exposed Email Addresses

2013-03-28 Thread Brandon McCaig
messages, and avoid fetching any URLs found within them (make sure your mail client doesn't do this automatically) and hopefully the spammers will move on to more vulnerable prey. Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software https

Re: IPC::Open3 Usage

2013-03-22 Thread Brandon McCaig
gracefully. Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org 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

Re: Installing from CPAN -- YAML

2013-03-21 Thread Brandon McCaig
::YAML. Its documentation seems to indicate that that is what I need. I installed it but still get the message 'YAML' not installed, will not store persistent state. So what should I install to satisfy the 'installer '? Try installing 'YAML'. ;) bash$ cpan YAML HTH. Regards, -- Brandon

Re: Problem Installing perlbrew

2013-03-20 Thread Brandon McCaig
(albeit, you said you were upgrading Perlbrew so I don't think it would have changed much, but I digress). You can clear that cache with `hash -r' from the affected shell. You can also just start a new shell. I doubt this is applicable to your situation, but you never know... :) Regards, -- Brandon

Re: Problem Installing perlbrew

2013-03-20 Thread Brandon McCaig
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, Angela Barone

Re: Dynamically created perl script

2013-03-19 Thread Brandon McCaig
and perldoc warnings. Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org 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

Re: anonymous array for loop

2013-03-10 Thread Brandon McCaig
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 (split //, abc) { print $_\n

Re: anonymous array for loop

2013-03-10 Thread Brandon McCaig
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 the list in parentheses where

Re: anonymous array for loop

2013-03-09 Thread Brandon McCaig
. 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 bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software https://www.castopulence.org

Re: Running into dependency hell with Cygwin when trying to install Excel-Writer-XLSX-0.65 and have all tests pass and not skipped

2013-03-09 Thread Brandon McCaig
. Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org 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

Re: anonymous array for loop

2013-03-09 Thread Brandon McCaig
ref into it, and then printed its elements out (in a somewhat odd way). What does this demonstrate? Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software https://www.castopulence.org/ Blog http://www.bamccaig.com/ perl -E '$_=q{V zrna gur orfg jvgu jung V

Re: Return values more than 256?

2013-03-07 Thread Brandon McCaig
byte. Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org 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

Re: Return values more than 256?

2013-03-07 Thread Brandon McCaig
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 least it will do what

Re: Return values more than 256?

2013-03-07 Thread Brandon McCaig
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 bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software https://www.castopulence.org/ Blog http

Re: Line Endings

2013-02-25 Thread Brandon McCaig
in you before I figured out how it is meant to work. do_something_with_line($line); } } Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software https://www.castopulence.org/ Blog http://www.bamccaig.com/ perl -E '$_=q{V zrna gur orfg jvgu jung

Re: Email::Mime not able to send array in mesg body

2013-02-20 Thread Brandon McCaig
  = 'ISO-8859-1',         content_type = 'text/html'       },       body_str = @email_body, body_str = $email_body,     );     sendmail($message); Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org Castopulence Software https://www.castopulence.org/ Blog http

Re: .profile not being read

2013-02-20 Thread Brandon McCaig
, but not by much. Regards, -- Brandon McCaig bamcc...@gmail.com bamcc...@castopulence.org 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

  1   2   3   >