>> 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
> >> 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
> 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
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
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
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) {
> 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
>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
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
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} =
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
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
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)]
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
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
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)
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
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
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
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:
> 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
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
22 matches
Mail list logo