RE: Post here of ActiveState Forum?

2012-02-28 Thread Barry Brevik
I didn't know that was there! Is there a mailing list version of that forum? Barry Brevik -Original Message- From: activeperl-boun...@listserv.activestate.com [mailto:activeperl-boun...@listserv.activestate.com] On Behalf Of Phillip Richcreek Sent: Monday, February 27, 2012 7:43

Trapping errors

2012-02-10 Thread Barry Brevik
the actual Perl messages. Is there a signal or something that I can trap? Barry Brevik ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Keyboard signals

2010-08-25 Thread Barry Brevik
Environment is Active Perl 5.8.8 on Windows. Does anyone know if there is a keystroke combo that will result in a SIG{QUIT} in the currently running Perl app? I know that SIG{INT} and SIG{BREAK} happen on CTRL-C and CTRL-Break. Thanks, Barry Brevik

Timeout problem

2010-07-29 Thread Barry Brevik
t;; } else { print "folder is actually a file.\n"; } } else { print "folder does not exist.\n"; } -Barry Brevik ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Help with sort

2010-03-31 Thread Barry Brevik
LABVIEW-2 LABVIEW-4 YESTECH-L03-RW2 YESTECH-L3-RW1 YESTECH-L4-RW125 Any ideas on how to get this to come out in the "right" order? Barry Brevik ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Variable scoping

2010-02-19 Thread Barry Brevik
ot imported at test5.pl line 17. Global symbol "$clr" requires explicit package name at test5.pl line 17. What gives? -Barry Brevik === use strict; use warnings; my $color = 'blue'; setColor($color); sub setColor { our $clr = $_[0]; adj

Help with socket timeout

2009-12-08 Thread Barry Brevik
if (socket(BARCODE, AF_INET, SOCK_STREAM, $printProtocol)) { if (connect(BARCODE, pack('Sna4x8', AF_INET, $printPort, $printHost))) { print "<< ok >>\n\n"; close BARCODE; } else { print "<< offline >>\n\n

Help passing data to subroutine

2009-12-01 Thread Barry Brevik
time, and can not figure it out! Ideally, the subroutine will never have a copy of the array in it's own space, but will only operate on the array in the caller. Can anyone show me how this is done? Barry Brevik ___ ActivePerl mailing list

Help with PerlApp

2009-11-18 Thread Barry Brevik
know, nothing has changed in my machine environment. Any ideas as to what might be causing this? Barry Brevik ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Help with $_

2009-10-27 Thread Barry Brevik
quot; in the same line of code that prints the default $_ variable? Barry Brevik ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Help with unpack

2009-10-09 Thread Barry Brevik
) comes out fine as "IHDR", but the first scalar comes out as "218103808" which is wrong as you can see above, it should be "13". I thought I was starting to understand unpack, but what am I doing wrong?? Barry Brevik

Help with regex

2009-08-13 Thread Barry Brevik
. ...but since the rest of the routine uses only regular expressions, I thought that it would be nice if this type of translation could be accomplished with a regex. I have not been able to think of a way, but I thought I would put it to the list to see if anyone else has done this before.

Help with file stuff

2009-07-17 Thread Barry Brevik
I'm creating a file which is just an ASCII text file, but I'm writing fixed length records into it. At any time, I need to reopen the file and write a record to a byte position calculated at run time. The write position will frequently be beyond the end of the current file length, so I need for the

help with dispatch array

2009-06-09 Thread Barry Brevik
I am running Active Perl 5.8.8 on Windows. I'm coding an app right now where it would be advantageous to be able to look up a text string in an array (or hash) and be able to branch to a subroutine that is somehow associated with that string. Am I dreaming, or is this possible? Barry B

Help with Regular Expression

2009-05-15 Thread Barry Brevik
elds contain hundreds of words both preceding and following the "bad" words, so I have to be able to pick out the lower-case words that contain one embedded upper-case character. Ant ideas? Barry Brevik ___ ActivePerl mailing list ActivePerl@

Odd thing with sprintf

2009-04-08 Thread Barry Brevik
", roundit($num, $places), "\n\n"; } #-- sub roundit { my($num, $places) = @_; return sprintf "%0.*f", $places, $num; } Barry Brevik ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Help with hex

2009-04-03 Thread Barry Brevik
contain any byte value from 00 to ff. I want to do this without adding the overhead of printf or sprintf to my program. Has anyone out there done this before? Barry Brevik ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http

I thought I knew this, but...

2009-02-26 Thread Barry Brevik
cords in hash: 3 ...which is correct. Anyone out there know what gives?? And which is the "correct" way to define an empty hash, {} or ()? Barry Brevik ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Problem with Perl on Win Srvr

2008-11-18 Thread Barry Brevik
e the Perl program using Perlapp, it runs fine. I have followed the instructions for creating the link between Perl an .pl in IIS and of course it was already there. I thought maybe it was permissions, but since it will run CGI executables and display html pages, I wonder. Any ideas? Ba

Help with strict

2008-08-22 Thread Barry Brevik
version (for example), I don't think that I am willing to go there. Can anyone tell me what is going on here? TIA, Barry Brevik ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Counting occurences?

2008-06-05 Thread Barry Brevik
ring. Is there a simple way to do this? Thank you, Barry Brevik ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Why does this work?

2008-05-20 Thread Barry Brevik
e set to 0 except $frow which is 1. Now I'm afraid that it might not always work because I don't understand why it works in the first case. Anyone want to suggest if this is stable code or not? Barry Brevik ___ ActivePerl mailing

Advice on hash sizes please

2008-03-04 Thread Barry Brevik
up in hashes is "too much"? Also, if I reinitialize an existing hash to (), will that return the memory to Windows? Barry Brevik ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Help separating arrays?

2008-01-22 Thread Barry Brevik
only the fieldnames?? Barry Brevik ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Tips on padding strings?

2006-10-06 Thread Barry Brevik
} I've just had this nagging feeling that this method is overly complex and there must be a more "Perl-ish" way of doing it. Anybody have any comments?? Barry Brevik ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

RE: Remove non-ascii character

2006-09-22 Thread Barry Brevik
And now, because it's Friday, we have the obfuscated "is it printable?" test: For each binary character stuffed into $i: if ( ((($i + 1) & 255) ^ 128) > 160 ) {print chr($i);} Barry Brevik ___ ActivePerl m

Re: Help with array syntax?

2006-09-15 Thread Barry Brevik
I want to thank everyone who responded to this thread, on list and off. All the replies were very helpful. Barry Brevik ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Help with array syntax?

2006-09-14 Thread Barry Brevik
@row = shift @cnxns; This seems like an annoyingly unnecessary piece of indirection to me. Does anyone know a better way to do this? I hope I did not lose anyone with this wordy post. Barry Brevik ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

RE: Help with listen?

2006-09-06 Thread Barry Brevik
;ll change my mind soon . Barry Brevik ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

REL: Help with listen?

2006-09-06 Thread Barry Brevik
y work fine most of the time. But sometimes I need to telnet 25 to the server manually for testing, and this would tie up the process for a long time causing other inbound connections to time out. Again, thank you all. This is turning out to be a very interes

Help with listen ?

2006-09-05 Thread Barry Brevik
I'm developing a special purpose mailer for internal company use. The application is being developed, and will run on Windows 2000. It is a requirement that there be multiple processes all listening on port 25 for inbound connections. Two weeks ago, my program would fork() every time it receive

RE: help with sockets

2006-08-17 Thread Barry Brevik
I want to apologize to you guys... due to a typo in my code, I thought that unbuffering STDOUT did not solve my problem. However, as it turns out, it DID solve my problem. Thanks so much for the help. There's not much traffic on this list, but it has some quality subscribers ! Barry ___

RE: Help with sockets

2006-08-16 Thread Barry Brevik
>If Barry could provide a small, self contained script >that demonstrates the problem it might be a lot easier to see. Brian makes a good point (because flushing STDOUT did not work, but I enjoyed learning about it). I wanted to avoid wasting bandwidth with a snippet, because the snippet is rath

Help with sockets

2006-08-15 Thread Barry Brevik
ow on the screen until the app terminates. I discovered that if I do: print STDERR "my message\n"; ...I get the result I am looking for. My question is: I just want to understand this. Why do I have to write to STDERR after opening a socket? Is it maybe a bad idea to do this