Re: return syntax?

2003-03-31 Thread $Bill Luebkert
st not to use a global $which vrbl when not needed. if (-e $which) { Fire off a messageBox called $overwrite with a cancel button; return ("Cancel") if ($overwrite eq "cancel"); } ... } IS that right? Thanks, Dud

Re: reformatting perl compiler warning/errors

2003-04-01 Thread $Bill Luebkert
given code. I posted a better solution using caller in a followup. -- ,-/- __ _ _ $Bill Luebkert ICQ=162126130 (_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /--< o // // http://dbecoll.tripod.com/ (Free

Re: GLOB

2003-06-06 Thread $Bill Luebkert
Sisyphus wrote: > - Original Message - > From: "$Bill Luebkert" <[EMAIL PROTECTED]> > >>>But what needs to be done when the variable contains >>>'GLOB(0x1a754f0)' ? >> >>Well, you put it there, so you should know what to do

Re: GLOB

2003-06-06 Thread $Bill Luebkert
rld > Child returned: Hello World > > Was there some particular reason for printing to STDERR ? No, not in the parent, in the child you would to avoid sending it back to the parent. > Apart from that, however, it's as clear as mud :-) The way that the child handles ST

Re: read binary file

2003-05-29 Thread $Bill Luebkert
ary >>file in Perl? We got this binary file that stores id number, >>username and >>more user info. We need to read this file and save it as a >>text file. Any >>suggestion? Thank you for any help in advance! >> >>Yachun -- ,-/- __ _ _

Re: More help!!

2003-05-31 Thread $Bill Luebkert
#x27;t even try unless you have an awfully good reason to. If they've made it in, why would you want them to do it again ? -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o // /

Re: -- trouble.

2003-06-17 Thread $Bill Luebkert
e_count--)]; > > I think is making @all_lines become @all_lines from 0 to $line_count, AND > THEN is decrementing $line_count by 1. > > I know I could decrement @line_count on the preceding line, but there _must_ > be a cool way of doing this?? Put the -- in the front instead

Re: Problem using rename() on WinXP Pro/ActiveState

2003-06-17 Thread $Bill Luebkert
{ > print "$_ => $renameHash{$t}\n"; > > rename($t, $renameHash{$t}) or warn $! Maybe try adding the dir since we don't know where you're running it from: rename ("g:/singles/$t", "g:/singles/$renameHash{$t}") or warn $! > } --

Re: HElp needed

2003-06-21 Thread $Bill Luebkert
ably do this for you for free. Your questions are too cryptic to answer since you aren't really describing what you have and what you really need or why you can't use CGI etc. >>From: "$Bill Luebkert" <[EMAIL PROTECTED]> >>To: ashish srivastava <[EMAIL PR

Re: how can I see exactly what headers are sent in an HTTP request

2003-06-21 Thread $Bill Luebkert
> and I don't have a network sniffer on that machine. How can I do that? You could try Tim's sniffer (redirect your url to the sniffer and have the sniffer set to where you want to go - slide it in the middle): http://www.schmerg.com/WrapUp.asp?file=HttpSniffer.html -- ,-/- __

Re: how can I see exactly what headers are sent in an HTTP request

2003-06-22 Thread $Bill Luebkert
tname that maps to that machine. Should be easy enough to adapt. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.

Re: shtml generation with perl

2003-07-04 Thread $Bill Luebkert
viktoras wrote: > Hi, > > Is it possible to use SSI in an shtml output generated by the cgi script ? > I'm just asking before I try it for myself :-) Just do the include yourself from the script - it's easy. -- ,-/- __ _ _ $Bill LuebkertM

Re: Need "good" sockets, preferably multi-threaded, client and serverskeleton code

2003-07-04 Thread $Bill Luebkert
r or an exception on select. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ -/-' /___/_<_http://dbec

Re: pound sign trouble

2003-07-07 Thread $Bill Luebkert
> > $rate = 1.65; > foreach my $line (){ > $line =~ m/£([\d,]+)/; > $price = $1; > $price =~ s/,//g; > $price = sprintf "%.2f",($price * $rate); > $line =~ s/£[\d,]+/\$$price/; > print $line; > } Or just put it all in a RE and substitute: foreach ... $line =~ s/£([\d,]+)

Re: pound sign trouble

2003-07-08 Thread $Bill Luebkert
> display 163 as the pound sign. Windoze doesn't have a real editor - you have to get a real editor from somewhere else. :) -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--<

Re: Get time and date for 2 weeks at a time

2003-07-15 Thread $Bill Luebkert
x27;t Friday $today += 86400 * (5 - $d[6]); # adjust to appear to be Friday } for (1 .. 14) { my @d = localtime ($today + 86400 * $_); printf "%02u/%02u/%04u\t%s\n", $d[4]+1, $d[3], $d[5]+1900, $DOW[$d[6]]; print "\n" if $_ == 7; } __END__ -- ,-/

Re: Get time and date for 2 weeks at a time

2003-07-15 Thread $Bill Luebkert
ryear=$year+1901;} > else {$curryear=$year+1900;} > print "$currmon/$currmday/$curryear $daynames[$currwday]\n"; > if ($curr==7) {print "\n";} > $curr++; > } -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (

Re: Keyboard input sting on Win32 pltform

2003-07-18 Thread $Bill Luebkert
if ($ch eq "\x08") {# backspace print "\b \b" if $pwd; # back up 1 chop $pwd; next; } if ($ch eq "\x15") {# ^U print "\b \b" x

Re: Reading EXCEL Sheet question

2003-07-21 Thread $Bill Luebkert
e using Win32::Service, but at the moment I'v >>>no time to do this, and I'm not sure that solve also this problem) >>> >>>Following I paste some code (an example and a part of whole >>>script) if you run this code and break the execution after >>>printout

Re: Why does while and sleep work this way

2003-07-29 Thread $Bill Luebkert
as it's happening. This has no effect on input buffering. See the getc entry in the perlfunc manpage for that. (Mnemonic: when you want your pipes to be piping hot.) -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// //

Re: [OT] Digitally signed posts

2003-08-01 Thread $Bill Luebkert
nice and fine. > I'm not sure that this can be achieved strikes me as being unlikely. It > would probably mean that everyone else would be seeing double, wouldn't it ? Like we really need digital signatures in this forum - just say no to digital signatures. :) -- ,-/- __

Re: Help with regex

2003-08-01 Thread $Bill Luebkert
} > } > s/_(\d{8}\.\d{6})/$1/g;# clean up markers > return $_; > > > The output I'm getting is > > ==converted sample > Date: 19970801.071016 PST) > > > The continued existence of that closing parens is the problem. It is not > being included in $

Re: test the existence of a file or a directory

2003-08-06 Thread $Bill Luebkert
Is it "g:\perl\bin\perl.exe" or something else? If you're speaking of the shebang line, I use #!perl -w -- If not, please explain further and remember to double your \s when inside "s and `s. -- ,-/- __ _ _ $Bill LuebkertMailto:[EM

Re: Win32-OLE excel cell reference.

2003-08-14 Thread $Bill Luebkert
correct syntax, please? I think it's just the UL and LR corners: my $cellsobj = $worksheet->Range("C7:E12"); -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] /

Re: system ('time', $time) driving me nuts]

2003-08-14 Thread $Bill Luebkert
may not be useful unless the failing child did an 'exit errno' (in which case you could get errno by right shifting $? 8 bits). -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / )

Re: split / regexp / $/=''and

2003-08-14 Thread $Bill Luebkert
print "$1\n"; > $replace = ; You need to restore $/ or localize it to the first while. > print "$replace"; > } > } { local $/ = ''; $_ = ; } while (/(KOLLOK.*\nZIEL\.\.\.:.*)/gs) { print "$1\

Re: CSV munging and "uninitialized values"

2003-08-14 Thread $Bill Luebkert
for $y (1 .. 41) { #open5 >if ($hash{$line[0]}{ratings}[$y] =~/\d/) { #open6 >$hash{$line[0]}{ratingstotal}=$hash{$line[0]}{ratingstotal}+$hash{$ > line[0]}{ratings}[$y]; >} #close6 > } #close5 > > ... > > > > The warnings still come on the pattern matc

Re: Round two -- system ('time', $time) driving me nuts

2003-08-14 Thread $Bill Luebkert
SystemTime: ' . Win32::FormatMessage(Win32::GetLastError()); # 8 short words: year month wday mday hr min sec msec my $lpSystemTime = pack '', $t[5]+1900, $t[4]+1, 0, $t[3], $t[2], $t[1], $t[0], 500;# wday not used and msec not avail so use half my $ret = $SetSyst

Re: CPAN Module UNIX Windows newline character

2003-08-18 Thread $Bill Luebkert
perl -pi.bak -e "" test.txt Perl can handle either UNIX or Windoze line endings on a Windoze system. UNIX can handle windoze line endings (except on the shebang line when started as 'scriptname' instead of 'perl scriptname', since the shell will barf on the \r

Re: Environment variables on Win98

2003-08-18 Thread $Bill Luebkert
10 => { 1 => 'Windows 98' }, > 90 => { 1 => 'Windows Me' }, }, > 5 => { 0 => { 2 => 'Windows 2000' }, >1 => { 2 => 'Windows XP' }, >2 => { 2 => 'Wi

Re: CPAN Module UNIX Windows newline character

2003-08-18 Thread $Bill Luebkert
his case. I know I didn't want your version: 's/\r?\n/\r\n/' since I wanted to be able to handle a \r after the \n (strange case) or just a \r in the case of a Mac. But then the read wouldn't terminate and you would need to add an /s qualifier (s/[\r\n]+/\r\n/s). -- ,-/- __

Re: Environment variables on Win98

2003-08-18 Thread $Bill Luebkert
#x27;Windows 2000' }, 1 => { 2 => 'Windows XP' }, 2 => { 2 => 'Windows Server 2003' }, }, ); > To see this, add this: > > use Data::Dumper; > print Data::Dumper->Dump( [ \%maj_min_id ], [qw(*maj_min_id)] ); > > -- >

Re: Help with snippet

2003-08-20 Thread $Bill Luebkert
foreach my $key (1 .. 80) { if ($key <= 9) { # put a 0 in front of single nums 1 - 9 $key = "0".$key; } foreach my $get (@all) { if ($key eq $get) { print "$key - $get \n";

Re: Octetstr to hex conversion

2003-08-29 Thread $Bill Luebkert
- can you supply a hex dump of the raw string you want to convert so we know what it looks like ? -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Mediev

Re: stopping a running process

2003-08-29 Thread $Bill Luebkert
any ways? You could start the process from the control process using Win32::Process::Create and it would be easy to kill it from that process via several methods. You could put it in systray (using Win32::GUI) or keep a socket open to accept a kill signal, etc. -- ,-/- __ _ _ $Bi

Re: Filter text in log file

2003-08-29 Thread $Bill Luebkert
etermine if each > one is a directory or file. I'm looking for a way to determine it from the > log file. > > I know there has to be a way validate if the line ending contains a period; > as in a file extension. -- ,-/- __ _ _ $Bill LuebkertMailto

Re: Regex Help Needed

2003-09-02 Thread $Bill Luebkert
) { print "found it\n"; } } sub check { my %letters = map { $_ => 0 } split '', $LS_Val; map { return 0 if not exists $letters{$_} or $letters{$_}++ } split '', $_[0]; return 1; } -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAI

Re: parse search string?

2003-09-02 Thread $Bill Luebkert
r not-wanted or put single or double > quotes or some other weird thing etc... if such a module exists I'd like to > know :) There is no standard that I know of for search string args. All CGI args are split at each '&' and starting at the '?'. EG: ?arg1=val1&

Re: Regex Help Needed

2003-09-02 Thread $Bill Luebkert
$Bill Luebkert wrote: > Dax T. Games wrote: > > >>I have a list of characters. I need to get a list of all possble >>sequences of these characters for example. >> >>I have a string that consists of '-mevqgn' I need to pattern match any >

Re: Perl eval wierdness

2003-09-04 Thread $Bill Luebkert
e. That's most likely to to the fact that Perl tried to optimize it into a constant and that happened during the compilation stage before the program actually ran. Nothing is out of the ordinary here. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// //

Re: Rename hash keys

2003-09-04 Thread $Bill Luebkert
err_perms } = "no permissions, check docs".; > $errs->{ err_unknown } = "unknown error occured."; > > How can I accomplish this using some perl statements? One way would be copy it and delete the old: $errs->{err_notfound} = $errs->

Re: Printer.pm

2003-09-15 Thread $Bill Luebkert
;\n"; print SPOOL $data; close SPOOL; ! # system($cmd) or die $OS_ERROR; # $Bill 09/15/03 ! system($cmd) and die $OS_ERROR; # $Bill 09/15/03 unlink $spoolfile; + # next 3 - $Bill 09/15/03 + } elsif ($self->{print_command

Re: newbie hlelp!

2003-09-15 Thread $Bill Luebkert
this date? stat should be fine : my $mtime = (stat $path)[9]; -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/

Re: newbie hlelp!

2003-09-16 Thread $Bill Luebkert
les) { next if $f =~ /^\.{1,2}$/; my ($dom, $mon, $year) = (localtime ((stat $f)[9]))[3,4,5]; printf "$f: %04d%02d%02d\n", $year+1900, $mon+1, $dom; } __END__ Your version also worked with minimal additions for scoping, etc. Maybe there's a problem usin

Re: newbie hlelp!

2003-09-16 Thread $Bill Luebkert
king for the 10th element in the stat return array. The parens are needed to make sure the brackets are applied to the results of stat rather than treating $file[9] as an array element to be used as an argument to stat. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_

Re: Reg Expression missing last char?

2003-09-18 Thread $Bill Luebkert
rint \"$_: \", \$$_, \"\n\" if defined \$$_"; } and you can wrap it in an if $debug for testing. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o //

Re: newbie hlelp!

2003-09-18 Thread $Bill Luebkert
it kinda hard to tell which you're talking about doesn't it. :) -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://

Re: Semantics, not a troll (was newbie hlelp!)

2003-09-20 Thread $Bill Luebkert
for these symbols. We all know exactly what we are using, whereas you are stuck with qualifying all your names. :) -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o // /

Re: Semantics, not a troll (was newbie hlelp!)

2003-09-20 Thread $Bill Luebkert
x27;t seen any flames. Just a lot of good >>humor. Been a fun topic. > > > Just ask "what's the best text editor for perl" and > you'll see :) That's trolling. You know there are only two real editors out there - vim and emacs. vim is easier/faster - em

Re: FW: byte-reversing nightmare

2003-09-21 Thread $Bill Luebkert
\xc3\x23\xa3\x63\xe3\x13\x93\x53\xd3\x33\xb3\x73\xf3\x0b\x8b\x4b\xcb\x2b\xab\x6b\xeb\x1b\x9b\x5b\xdb\x3b\xbb\x7b\xfb\x07\x87\x47\xc7\x27\xa7\x67\xe7\x17\x97\x57\xd7\x37\xb7\x77\xf7\x0f\x 8f\x4f\xcf\x2f\xaf\x6f\xef\x1f\x9f\x5f\xdf\x3f\xbf\x7f\xff/; } }, }); __END__ -- ,-/- __ _

Re: Array question

2003-09-25 Thread $Bill Luebkert
[EMAIL PROTECTED] wrote: > Hai, > > can any one tell how to pick up a particular pattern of files into that > array... > > Eg:- files with extension .pl or .cfg grep or a RegEx in a readdir loop. -- ,-/- __ _ _ $Bill LuebkertMailt

Re: Joining Text Files

2003-09-26 Thread $Bill Luebkert
ts etc) : open IN, ... open OUT, ... print OUT $infilename, "\n"; while () { print OUT; } close IN; open IN, ... print ... while ... close IN; close OUT; -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE Collectibl

Re: Date conversion

2003-09-29 Thread $Bill Luebkert
JUN => 5, JUL => 6, AUG => 7, SEP => 8, OCT => 9, NOV => 10, DEC => 11); my $date = '20-Sep-03'; my @d = split /-/, $date; my $newdate = sprintf "%04u%02u%02u", 2000+$d[2], $mons{uc $d[1]}+1, $d[0]; print $newdate, "\n"; --

Re: help with system() command

2003-10-13 Thread $Bill Luebkert
oesn't like slashes: system 'c:\dos\uudecode', $i; system "c:\\dos\\uudecode $i"; -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medi

Re: Environment variables

2003-10-15 Thread $Bill Luebkert
ildren spawned (including system calls) if that helps. The reverse is not true. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Mag

Re: Hash matching question.

2003-10-15 Thread $Bill Luebkert
#x27;, '/3/', '/2/', '/1/')) {$points > = 0}; > if ($array[35..42] =~ ('/10/', '/8/', '/6/', '/5/', '/4/', '/3/', '/2/', > '/1/')) {$points = 1}; > > What's the correct way t

Re: ErrorI am trying to get the print modules to work (Printer.pm and Win32.pm)

2003-10-16 Thread $Bill Luebkert
Russbucket wrote: > I made changes suggested by Bill Luebkert to the Printer.pm and Win32 > modules. These help but I am continuing to get the following error: "Can't > call method "list_printers" on unblessed reference at printe~1.pl at line 9" > >

Re: Reg Ex

2003-10-21 Thread $Bill Luebkert
n", # bad one "abcdefghijklmnopqrsyz01232456789\n", # good one "abcdefghijklmnopqrstyz01232456789\n",# bad one ) { if (/^.{20,20}(.*)$/) { print "$1\n"; } } __END__ -- ,-/- __ _

Re: perl on win32 annoyances

2003-10-21 Thread $Bill Luebkert
instead of > going > to ppm, etc. One of my problems with Cygwin too. I don't like the emulation layer, I prefer a native port. You have to go Mingw. I even use a tcsh native port for my shell to avoid the Cygwin pathing crap. -- ,-/- __ _ _ $Bill Lueb

Re: a TMTOWTDI question...

2003-10-21 Thread $Bill Luebkert
while (<>) if (/ /) { print $prev_line; # or opt check for null: if $prev_line; print $_; } $prev_line = $_; } -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED]

Re: Looking for command Line interface

2003-10-30 Thread $Bill Luebkert
dules and testing them out I thought I'd > solicit recommendations. Check psh (The Perl Shell) or Term-Shell (a shell framework). -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] /

Re: command prompt problems.

2003-10-30 Thread $Bill Luebkert
way around this, or found a suitable alternative? > > I tried copying cmd.exe from a w2k system onto it, but it wouldn't run. Try the one on my Tripod site. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[E

Re: command prompt problems.

2003-10-30 Thread $Bill Luebkert
om I also have a Win32 native port of tcsh. You can get it on by Tripod site by getting the link for cmd.exe and modifying cmd to tcsh (since I don't have an HTML link in there yet). -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE C

Re: command prompt problems.

2003-10-30 Thread $Bill Luebkert
8 original? cmd.exe didn't come with Win98. It cam with NT/2000/XP. There was a version of cmd.exe that was designed for use on 98 and that is the one I have there. It used to be available from M$, but I think they may have dropped it (not sure). -- ,-/- __

Re: Regex in Mail::BulkMail

2003-11-06 Thread $Bill Luebkert
> \.[a-zA-Z]{2,3,4})\s*$ > would do the trick but I guess I'm wrong. > > How can I patch this correctly? Try \.[a-zA-Z]{2,4})\s*$ > (I'm sure the newer version of Mail::BulkMail fixes this but it has changed > quite drastically and I'm not re

Re: NET:SMPT LocalPort?

2003-11-06 Thread $Bill Luebkert
port 25, then the following works. > my $smtp = Net::SMTP->new('enersave.ca'); That's all very confusing since you didn't use names for the machines. If you say I'm on B and the server is on A etc. it would be easier to follow. Maybe you want PeerAddr/PeerPort rather tha

Re: Running my perl script in Linux

2003-11-12 Thread $Bill Luebkert
script in Linux > > > hi, > > make sure that the first line in your script is: > !#/usr/bin/perl [or wherever your perl is installed] > > also make sure that the perl script has execute permition for the user you > are running from. -- ,-/- __ _ _ $

Re: proxy error and using LWP getstore

2003-11-14 Thread $Bill Luebkert
STDERR "Error getting $url, ", $res->status_line, "\n"; die; } close OUT; # what's the purpose in reading this file ? #my $outdir = 'C:/a_perl/hw10/sols' ; #my $src = "$outdir/quakes_all.html"; # open IN, $src or die "Can't read

Re: proxy error and using LWP getstore

2003-11-15 Thread $Bill Luebkert
$ua->cookie_jar(); $ua->cookie_jar(HTTP::Cookies::Netscape->new); $ua->cookie_jar(HTTP::Cookies->new(file => 'lwpcookies.txt', autosave => 1)); You can also check out WWW::Mechanize for this sort of thing. -- ,-/- __ _ _ $Bill LuebkertMailto

Re: Output redirection fails!, Win32::Daemon -> Win32::Process

2003-11-19 Thread $Bill Luebkert
previous file test (or stat operator) is used, saving a system call. (This doesn't work with "-t", and you ^^^ need to remember that lstat() and "-l" will leave values in the stat structure for the symbolic link, not the real fi

Re: Output redirection fails!, Win32::Daemon -> Win32::Process

2003-11-19 Thread $Bill Luebkert
Make that perlfunc man page on prior email. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ -/-'

Re: Interrupt Trapping?

2003-11-20 Thread $Bill Luebkert
aught a SIG '$_[0]' - shutting down\n"; exit 0; } -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ -/

Re: Capture external command output line by line on Windows 98

2003-11-20 Thread $Bill Luebkert
ement it on windows 98 ? Either get cmd.exe which can handle 2>&1 or use a Perl equivalent of dir instead of shelling out. There is a cmd.exe on my Tripod site for 9x. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE Collecti

Re: Ignorant wumpus? Or scoping problem?

2003-11-22 Thread $Bill Luebkert
is a bug, or a technical question no one here can answer, > what forum should I turn to next? > > > Pared down test case code: > (you should be able to pipe this message to perl -x to execute the test > case) > > #!perl -w > use strict; > use warnings; >

Re: Ignorant wumpus? Or scoping problem?

2003-11-22 Thread $Bill Luebkert
on it. I would try to avoid using global variables and pass them as args when necessary (except for the rare cases when that's not practical). -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROT

Re: Asking for password

2003-11-25 Thread $Bill Luebkert
next; } if ($ch eq "\x15") {# ^U print "\b \b" x length $pwd;# back 1 for each char $pwd = ''; next; } $pwd .= $ch; print '

Re: Gettind rid of control chars again.

2003-11-25 Thread $Bill Luebkert
similar) or tr/\x00-\x08\x0b-\x1f//d; # keep TAB and LF -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.

Re: first time creating a module,question on pod2hmtl

2003-11-24 Thread $Bill Luebkert
ed pod2html --infile= --outfile= > > The helpful error msg: >The syntax of the command is incorrect. Start by dropping the < and > - means to substitute your name there without the <>. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTEC

Re: Per to C communications

2003-11-26 Thread $Bill Luebkert
$Bill Luebkert wrote: > Rick Fitzsimmons wrote: > > >>Hi, >>New to this list, so hope this isn't a regular issue. >> >>I need to use Perl to communicate with a C program on a single host PC. >>The C program currently uses a non-blocking socket for t

Re: regex and filename

2003-11-27 Thread $Bill Luebkert
.", $file);" isn't giving me what I > expect. use File::Basename; my ($name, $path, $ext) = fileparse ($ARGV[0], '\..*$'); # print "path='$path', name='$name', ext='$ext'\n"; $ext = '.xls'; print "$path$name$ext\n"; --

Re: multithreaded server with mswin32

2003-11-28 Thread $Bill Luebkert
d > exit; > } > > # we didn't forked for some reason > # check sanity of the server and restart it if something gone > # wrong with this request > unless ( defined $self->{'server'} ) { > ( $res, $exc )= $self->setu

Re: Sorting numbers?

2003-12-02 Thread $Bill Luebkert
st = sort { $a <=> $b } @msgs; > > $found = $msglist[0]; > for ($i = 0; $i < scalar(@msglist); ++$i) { > print "Checking message $msgs[$i]\n"; print "Checking message $msglist[$i]\n"; > last if ($msglist[$i] == $message); > } > $found = $m

Re: reg exp help

2003-12-07 Thread $Bill Luebkert
represents an octal number - each o can be 0-7; \040 = space \xhh represents a hex number where each h can be 0-9 or A-F; \20 = space -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--<

Re: reg exp help please

2003-12-07 Thread $Bill Luebkert
26:"product_name=Madhatter_Hat";i:4;s:8:"cd_num=2";i:5;s:4:"x=39";i:6;s:4:\y=12"};); my @args = $_ =~ /"(.*?)"/g; print join (',', @args[0..3]), "\n"; -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED

Re: Fwd: Re: reg exp help please

2003-12-07 Thread $Bill Luebkert
spliti(regexp patter,str,max split) >>> spliti(":",$my_Propellar_Data,15); >>> >>>the above is the only regexp that works so far , but doesnt come close >>>to matching what I want. >> >>$_ = >>q(a:7:{i:0;s:19:"MadhatterSize=Adu

Re: reg exp help

2003-12-07 Thread $Bill Luebkert
Ted S. wrote: > $Bill Luebkert graced perl with these words of wisdom: > > >>Eric Edwards wrote: >> >> >>>Hello list, >>>I need help with a regular expression. I am teaching myself perl. >>>The book I am using has: >>>the class [\0

Re: totally redirecting STDIN,STDOUT,STDERR from cmd.exe (prompt)

2003-12-07 Thread $Bill Luebkert
e question is what will that do on Win32 - try it and find out. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.tod

Re: Finding highest numbered filename in dirctory?

2003-12-08 Thread $Bill Luebkert
ust sort them and use the first (or last) element as the number (depending on sort order). my $nxtmsgnum = (sort { $a <=> $b } @msgnums)[-1]; -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMA

Re: perl arraay

2003-12-09 Thread $Bill Luebkert
chomp ($input = ); } my @temp; my $ii = 0; while ($input > 0) { $temp[$ii++] = $input & 1; $input = $input >> 1; } print join ('', reverse @temp), "\n"; __END__ -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED]

Re: Redirecting STDOUT

2003-12-12 Thread $Bill Luebkert
while (defined(my $byte = <$client>)) { > print WH $byte; > } > #kill("TERM", $kidpid); > } > else { > my $l; > while ((defined ($l = ))) { <- problem here, RH does not write > to client

Re: Command Line WinZip Executed From Win32 Perl Script

2003-12-16 Thread $Bill Luebkert
; print OUT "\n"; close OUT; I'm running it under tcsh which is probably why I quoted '*.*'. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o // // C

Re: message replies

2003-12-18 Thread $Bill Luebkert
Lee Goddard wrote: > $Bill Luebkert mailto:[EMAIL PROTECTED] wrote on Thursday, December 18, 2003 3:02 AM: > > | I agree - never use M$ email clients. Also a good way to pick > | up viruses. > > Quite, but of course not all of use can decide what we use in our offices. Som

Re: Capturing X.

2003-12-18 Thread $Bill Luebkert
Beckett Richard-qswi266 wrote: > Guys, > > Does anyone know how to catch the user pressing the X in the corner of the > window, like I can catch the Control-C? > > $SIG{"INT"} = \&control_c; Try: $SIG{BREAK} -- ,-/- __ _ _ $Bill Lue

Re: message replies

2003-12-18 Thread $Bill Luebkert
Web Manager wrote: > Lee Goddard wrote: > > >>$Bill Luebkert mailto:[EMAIL PROTECTED] wrote on Thursday, December 18, > > 2003 3:02 AM: > >>| I agree - never use M$ email clients. Also a good way to pick >>| up viruses. >> >>Quite, but of cou

Re: set up unix code on windows

2003-12-19 Thread $Bill Luebkert
l" or die "Can't exec ls: $!"; Other than that, it should work if you have a copy of ls hanging around on your system. Otherwise, consider using dir or not shelling out. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // D

Re: set up unix code on windows

2003-12-19 Thread $Bill Luebkert
uot;; Try execing the shell instead of dir directly (which is a shell builtin) then : chdir '/' or die "Can't chdir to root directory: $!"; exec 'cmd /C dir' or die "Can't exec dir: $!"; -- ,-/- __ _ _ $Bill LuebkertMailto:[EM

Re: Array within an array...? I'm confused

2003-12-19 Thread $Bill Luebkert
e? Dump it with Data::Dumper and it should become obvious : use Data::Dumper; $Data::Dumper::Indent=1; # pick one of the below methods: # print Data::Dumper->Dump([$rules], [qw($rules)]); # print &Data::Dumper::Dumper($rules); > 2. How do I add to it? (I assume $rule[0][2] = "

Re: Perl 5.8 problems with print

2003-12-20 Thread $Bill Luebkert
int and you'll > unbuffer it and will see a difference. Read 'perldoc perlvar' (search for > autoflush) for an explanation. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTE

Re: building variable name

2003-12-20 Thread $Bill Luebkert
t; print "\$a$_\n"; # false > }; > > I need to get: > foo > bar > foobar This is almost always a bad idea. You can use eval if you must, but instead of using vrbls, why not use a hash and simplify things ? my %h = ('a6' => 'foo', 'a7&#x

Re: Pop3-server, octets?

2003-12-22 Thread $Bill Luebkert
it bytes/octets in a DB unless they are storing raw binary blocks of data (like an image for example). I think you can safely assume a byte and octet to be equivalent in the cases you've described so far. > I'm running on a windows 2k machine right now but would very much like a &g

  1   2   3   4   5   6   7   8   9   10   >