RE: Pacify user.

2003-11-25 Thread Morbus Iff
>> print "$animation[$counter++]\b"; > >I think you got this backwards. The backslash should be before the counter, >otherwise the animation won't look right, particularly for slower loops. I didn't test slower loops - the above code worked with no noticeable uglies on a dual 450mhz machine. >> $co

RE: Pacify user.

2003-11-25 Thread Thomas, Mark - BLS CTR
> >> print "$animation[$counter++]\b"; > > > >I think you got this backwards. The backslash should be > before the counter, > >otherwise the animation won't look right, particularly for > slower loops. > > I didn't test slower loops - the above code worked > with no noticeable uglies on a du

RE: HTML::TableExtract

2003-11-25 Thread Thomas, Mark - BLS CTR
> The HTML doc and its jpeg images are stored on LAN drive (in > the same directory), and I can not determine how to use > LWP::UserAgent or WWW::Mechanise to do this from a network drive. Makes no difference. file:// URLs work exactly like http:// URLs. -- Mark Thomas[EMA

RE: HTML::TableExtract

2003-11-25 Thread Ross Clunie
The HTML doc and its jpeg images are stored on LAN drive (in the same directory), and I can not determine how to use LWP::UserAgent or WWW::Mechanise to do this from a network drive. Thanks Ross Clunie > If I was to do it, I might use WWW::Mechanize or LWP::UserAgent to > download > the img afte

RE: Pacify user.

2003-11-25 Thread Thomas, Mark - BLS CTR
Morbus, Looks like an interesting book. I have some comments about the code in question: > print "$animation[$counter++]\b"; I think you got this backwards. The backslash should be before the counter, otherwise the animation won't look right, particularly for slower loops. > $counter = 0 if $co

RE: Pacify user.

2003-11-25 Thread Thomas, Mark - BLS CTR
I do this, and it pacifies users pretty well: my $line=1; print "Processing line: "; foreach (1..1000) { print "\b" x length($line-1), $line++; # do stuff } Adapted to your script: > # Parse input file > print "Parsing $ARGV[0], line #: "; > my $linecount = -1; > while (1) {

Re: Pacify user.

2003-11-25 Thread C. Church
> So, rather than taking some 2x4 to the user, can anyone come up with a > reliable way of printing a dot every 10 seconds, or something else that > makes users feel all warm and fuzzy about one's scripts? Why not just, on every ten loops, print a backspace-forward-slash, then after the next ten l

Re: Pacify user.

2003-11-25 Thread Morbus Iff
>So, rather than taking some 2x4 to the user, can anyone come up with a >reliable way of printing a dot every 10 seconds, or something else that >makes users feel all warm and fuzzy about one's scripts? I've written about progress bars within Perl in my second book, SPIDERING HACKS. The hack in que

RE: Pacify user.

2003-11-25 Thread Messenger, Mark
You could change print "." to print "($linecount/100)\r" perhaps? -Original Message- From: Beckett Richard-qswi266 [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 25, 2003 11:37 AM To: '[EMAIL PROTECTED]' Subject: Pacify user. Guys, I've just completed a fantast

RE: Endless Loops in Perl

2003-11-25 Thread Barry.Dancis
Below is a pretty way to display the values in a web page Enjoy! Barry print < EOD my %system = (); $system{PROCESS_ID} = "$$"; $system{REAL_USER_ID} = "$<"; $system{EFFECTIVE_USER_ID} = "$>"; $system{REAL_GROUP_ID} = "$("; $system{EFFECTIVE_GROUP_ID} = "$)"; $system{PROGRAM_NAME} =

Pacify user.

2003-11-25 Thread Beckett Richard-qswi266
Guys, I've just completed a fantastic script that parses log files. ;-) I sent it it to a user to test, and he thought that his PC had hung, whereas in fact he'd just given it a huge file to parse. So, he ended it, despite the fact that I printed "Parsing log232.txt, please wait. This may take so

Re: automate web login

2003-11-25 Thread David Byrne
Thank you all for your responses. It turns out, as specified by [e]agLØrT, there was a hidden value that was tripping me up. With that fix & POST, I was able to login. Thanks again! --- "[e]agLØrT" <[EMAIL PROTECTED]> wrote: > Hi.. > Well, your method POST is not allowed for index.html > but as

RE: just installed ActivePerl on my win98 - what's next

2003-11-25 Thread Arms, Mike
Ted, you coding logic is faulty. Here is a much more compact way to write it right way. :-) my @adj = qw( totally really truly awesomely ); my @verb = qw( rules rocks dominates ); for my $y (0..20) # No need to loop 500 times :-) { print "ViM"; print ' ', ( $_ < $y ? $adj[int(rand @adj)]

Re: Fw: Removing double spaces from a file

2003-11-25 Thread Lori
Try one of these: $_=~ s/\s+//sg; $_ =~ s/^\s+//; #Removing leading spaces Nicu Ionita wrote: > > > > while () > > { > > s/\s\s/\ /g; > > print OUT $_; > > } > > > > > > (Assuming IN is an already open filehandle to the source file, and OUT is > one to a destination file.) > > This doesn

RE: Perl and authentication using LDAP

2003-11-25 Thread Edgington, Jeff
Install perl-ldap module. use net::ldap $ldap = Net::LDAP->new('your-server-here', port => 389, version => 3) || die "failed: $@"; $mesg = $ldap->bind('[EMAIL PROTECTED]', password => $pw); $mesg->code && die "bind failed: $mesg->error"; More to it than the above, but that will bind you to th

Geting user information

2003-11-25 Thread Tfbsr Bertrand
I am using perl 5.8 and trying to get user attributes from the domain server.  Since the package AdminMisc will not work with 5.8 or at least I get an error message when I try to. Are there any other packages I can use to extract that information from the domain server(example last login time, etc)

Re: Gettind rid of control chars again.

2003-11-25 Thread Richard Morse
On Tuesday, November 25, 2003, at 09:04 AM, Beckett Richard-qswi266 wrote: However, I've got some files to parse, with all sorts of odd control chars in them. I tried getting rid of them with: $var =~ s/\c.//g; but it didn't do anything. Is there a clever way to get rid of all of them in one

Perl and authentication using LDAP

2003-11-25 Thread Kraaijer Ronald
Hello everybody, I want to authenticate a particular user using LDAP, any ideas how this is done? Disclaimer - Winterthur Europe Assurances - Avenue des Arts/Kunstlaan 56 - 1000 Brussels - Belgium. This e-mail is i

RE: Asking for password

2003-11-25 Thread Kraaijer Ronald
Cool, works like a breeze, thanks very much :-)) (Huge smile) -Original Message- From: $Bill Luebkert [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 25, 2003 3:21 PM To: Kraaijer Ronald Cc: perl-win32-users Subject: Re: Asking for password Kraaijer Ronald wrote: > Works, but I would

Re: Gettind rid of control chars again.

2003-11-25 Thread $Bill Luebkert
Beckett Richard-qswi266 wrote: > Guys, > > If you know which control character you're looking for (eg CNTRL@), it's > easy enough to get rid of with: > > $var =~ s/\c@//g; > > However, I've got some files to parse, with all sorts of odd control chars > in them. I tried getting rid of them with:

RE: Asking for password

2003-11-25 Thread Thomas, Mark - BLS CTR
> Works, but I would like to still echo a character > representation "*", any ideas on that? This seems to work: --- #!perl -w $|++; use Term::ReadKey; my $pw; while (1) { while (! ($key=ReadKey(-1))) {} last if ord($key)<32; $pw .= $key

Re: Asking for password

2003-11-25 Thread $Bill Luebkert
Kraaijer Ronald wrote: > Works, but I would like to still echo a character representation "*", any > ideas on that? Try something like: binmode STDIN; print "Password: "; ReadMode ('cbreak'); while (defined (my $ch = ReadKey ())) { last if $ch eq