Forum: Perl Sep 28th, 2005 |
| Replies: 1 Views: 8,192 Myself, I'd use perltk. The Tk module comes with activestate's version, so portability to windows, if required, is less of an issue. The usenet group comp.lang.perl.tk is helpful. The O'Reilly... |
Forum: Perl Sep 1st, 2005 |
| Replies: 2 Views: 15,101 Net::Ping defaults to a tcp connection to the echo port (7 according to my /etc/services file). Use this (from the Net::Ping man page) example to do a regular ICMP ping like the command line:
... |
Forum: Perl Jul 7th, 2005 |
| Replies: 3 Views: 35,070 I like this bit from the Time::HiRes manpage
# Arm an interval timer to go off first at 10 seconds and
# after that every 2.5 seconds, in process virtual time
... |
Forum: Computer Science Jul 5th, 2005 |
| Replies: 29 Views: 8,262 In perl, this works for non-numeric scalar variables too:
#!/usr/bin/perl
$a="abcd";
$b="yyyyyy";
$a ^= $b;
$b ^= $a; |
Forum: Perl Jul 4th, 2005 |
| Replies: 2 Views: 6,057 I see a couple problems with this script (besides it grabbing over 1025MB of memory when i ran it under linux, which it didn't do under windows)
First, you should always use this line at the top... |
Forum: Perl Jul 4th, 2005 |
| Replies: 18 Views: 21,817 You can try this bit of code to get the output and errors into a scrollable Tk::Text window:
#!d:\perl\bin\perl.exe -w
use strict;
use Tk;
use IPC::Open3;
my $filename="perl myfile.pl"; ... |
Forum: Perl Jun 22nd, 2005 |
| Replies: 3 Views: 3,484 Yeah I proly just got too impatient and stopped the MSI version. The installer.bat is in the zip AS version too. I was using slower computer so that might have been why it seemed so slow :) Only... |
Forum: Perl Jun 22nd, 2005 |
| Replies: 2 Views: 6,747 I've put screenshots showing how i run a script called getmap.pl on my win98 machine:
http://plh.org/getmap.jpg for start/run window
http://plh.org/msdos.jpg for msdos window
I added the... |
Forum: Perl Jun 21st, 2005 |
| Replies: 2 Views: 2,426 I believe the installer.bat file (a perl script) does a lot of file path renaming in various scripts in the perl installation. Using perl without running installer.bat is problematic. You also may... |
Forum: Perl Jun 21st, 2005 |
| Replies: 3 Views: 3,484 I tried it on my win98 machine. The MSI version kept hanging at the making html step. Extracted the AS version to D:\ActivePerl-5.8.7-813-MSWin32-x86-148120\ActivePerl-5.8.7-813-MSWin32-x86-148120\... |
Forum: Perl Jun 13th, 2005 |
| Replies: 9 Views: 7,900 Anything I can do to help =) |
Forum: Perl Jun 10th, 2005 |
| Replies: 9 Views: 7,900 Thx =) Hmm my first comment in the subroutine is wrong though :(
It always enters the subroutine in state=1. The comment should have been
# always enters in $state=1 ie: whether it was a fresh... |
Forum: Perl Jun 10th, 2005 |
| Replies: 9 Views: 7,900 Here's a bit of code that prints the multi-line error message from that log sample:
#!/usr/bin/perl -w
use strict;
my $log="log";
my $partial="";
my $state=1;
if ( $ARGV[0] ) {... |
Forum: Perl Jun 3rd, 2005 |
| Replies: 10 Views: 9,983 Missed that bit in your previous post, my bad. |
Forum: Perl Jun 3rd, 2005 |
| Replies: 10 Views: 9,983 Dang, no threading :( more stupidity from me |
Forum: Perl Jun 3rd, 2005 |
| Replies: 10 Views: 9,983 Not that it's necessary to change something that works (believing this may be a perl sin, so i'll say a perl prayer later...) but you can change those two lines into one and eliminate the extra... |