Is there some reason that there seems to be no PPM for
Soundex 3.02 at
Hmm. Guess no one knows the answer?
Many years ago I asked a similar question, and the answer I got was that
the soundex algorithm has been superceded by superior ones, such as
metaphone. So I tried Text::Metaphone
Remember when one state (Kansas, Nebraska, or Arkansas, I think it
was)
wanted to declare pi = 3, which would've made all the wheels in the
state turn square overnight?
This isn't quite true, but the truth is equally weird. It was a bill
with a method to square a circle, which is to find a
Howard Maher wrote:
Does anyone know of a module or script that can be used to
convert a 'fully-editable RTF' file to plaintext? I don't
need to edit RTF, but just convert it to an ASCII flat-text file.
You mean like this?
We have an IIS configuration where there are many virtual directories
(150+) that point to a remote share. For each of them you have to
specify a password (in our case they are all the same). Where is this
information stored? Is there a way to make the password change en masse?
Also, we need to
You can encrypt the passwords in a file, but keep in mind that anyone
that can access the code can retrieve the password. It's best to also
make sure that the user account only has permission to do what it needs,
and nothing else.
--
Mark Thomas
Internet Systems Architect
David wrote:
I am having trouble submitting a form because it is
using an image to click on.
...
How do I submit/click on this image.
Can't you just use Mech's submit() function?
___
Perl-Win32-Users mailing list
I am having trouble submitting a form because it is using
an image to click on.
I have another idea. Try this:
$mech-set_fields( $name.x = 1, $name.y = 1 );
where $name is the name of the image. Then submit().
IIRC, this is what real browsers send with an input image.
- Mark.
Craig Cardimon wrote:
I have something like this:
while (FILE)
{
if (/TAG/ .. /\/TAG/)
{
# process line
}
}
I got this from http://www.perl.com/pub/a/2004/06/18/variables.html.
My special wrinkle is, I want to process certain sections of
a file, but only if that
If character escaping is your only problem, all you have to do is this:
use CGI qw/:all/;
print escapeHTML($xml);
--
Mark Thomas
Internet Systems Architect
___
BAE SYSTEMS Information Technology
2525 Network Place
Herndon, VA 20171 USA
There are a couple of modules that may do what you want. Check out
these:
Hash::MultiKey
Data::MultiValuedHash
Tie::AliasHash
But if you know a modicum of SQL and want to store the data, you may
want to use SQLite. What you've described is a many-to-many relationship
between the machines and
David Hsu wrote:
I only want the name in last Name tag and the Jobtitle
(i.e. Susan Miers President)
You may want to look into XPath. Here's a sample:
use XML::XPath;
my $xml = qq(
sample
NameFNJohn/FN LNSmith/LN/Name,
NameFNSusan/FN LNMiers/LN/Name
Are there modules faster than Data::Dump?
Interesting. I'd never heard of Data::Dump. I always use Data::Dumper.
Have you tried that? It uses XS code so it should be faster.
You can also try Storable.
- Mark.
___
Perl-Win32-Users mailing list
I realized that my previous post had the wrong comparison. Here's one
that's short and to the point:
re1 = q($str = ' 259.00 '; $str =~ s/\s(?=\s*\S)/0/g;),
re2 = q($str = ' 259.00 '; $str =~ s/ (?= *\d)/0/g;),
Benchmark: timing 100 iterations of re1, re2...
re1: 3
$Bill Luebkert wrote:
Rate RE2 RE5 RE3 RE4 RE1 RE1a
RE2 136761/s -- -58% -61% -64% -74% -74%
RE5 326584/s 139% -- -6% -14% -37% -37%
RE3 347705/s 154% 6% -- -9% -33% -33%
RE4 381098/s 179% 17% 10% -- -26% -26%
RE1 516529/s 278% 58% 49% 36% -- -0%
RE1a
I think I can explain it. When (5) sees the .*\d, the .*
grabs all the characters, then the RE engine backs up until
it releases a digit to match the \d. (1a), on the other
hand, just grabs spaces with \s*; it isn't allowed to grab
anything else.
That wasn't it... Surprisingly, replacing
Using a regex, I want to replace each leading space-character
with a corresponding zero-character on a one-to-one basis.
For an example
string:
My $string = ' 259.00 ';
Note that I don't want to change the trailing space
character. The resulting string would look like:
$last{substr($_,0,4)}=$_ for @myArray;
print join \n, sort values %last;
Whoops, one thing wrong with this ... since you don't
sort before creating your hash, if the order of the data was
such that the newer version appears earlier in the array,
your results are wrong.
Anyway
Yekhande, Seema (MLITS) wrote:
Do you have any
idea about why column_average function doesn't works when
multiple files
Are passed using the for routine?
...
sub column_average {
my ($idx) = @_;
my $sum = sum map {$_-[$idx] if defined $_-[$idx]} @data;
return $sum;
}
This
Actually Regex is taking more time instead of agrep. That's
why the idea of using either agrep or find.
This is small input.txt which I am using it as a input file.
If there is any other way of increasing the speed of same
Perl script, it is really required.
This has a chance of being
Bill Ng wrote:
Okay,
Here's what I've come up with:
--
@list = (aacs1110, brbt4332, rtxa4320, aacs2000,
brig5621, brbt5220, nbvc);
@list = sort @list;
foreach $item (@list) {
$itemPref = substr($item, 0, 4);
$itemVers = substr($item, 4);
$h{$itemPref} =
Jim Hill wrote:
| $ini{section}{match} = '$1 $2';
... however that just prints $1 $2 as a literal string.
Hint: the above two lines of your post answer your own question.
:-)
- Mark.
___
Perl-Win32-Users mailing list
Thomas, Mark in
[EMAIL PROTECTED]:
From: Jim Hill [mailto:[EMAIL PROTECTED]
Thomas, Mark in
[EMAIL PROTECTED]:
Jim Hill wrote:
| $ini{section}{match} = '$1 $2';
... however that just prints $1 $2 as a literal string.
Hint: the above two lines of your post
I'd like to thank everybody who came up with suggestions.
One thing I
forgot to point out is that there are also people with
whitespace in their
*given* names, which seems to make things even more problematic
I've updated my solution to accommodate that:
while (DATA) {
my @cols =
I'm fairly good at using regexes to find things, but using them to
*replace* things is something I find quite difficult. I have
a text file with lines like this:
snip
1 (1) DAVENPORT, LINDSAY 3380.00 16 .00 49.00 USA .00
2 (2) CLIJSTERS, KIM 3206.00 17 .00 .00 BEL .00
[...]
28
Craig A Dayton wrote:
Yes, try http://cpan.uwinnipeg.ca/
I was impressed with it and be sure to try Par::Webstart.
Randy Kobes has done a good job.
-Craig
Huh? That looks like a normal CPAN mirror, and like I said, the module
doesn't exist in CPAN. If
I'm in need of
Win32::AdminMisc and roth.net has been down for several days. Why this module
has never been in CPAN and/or the AS ppd list is a mystery to
me.
Does anyone know
of a mirror? Or has a cached/downloaded ppm file?
Thanks,
-
Mark.
Also, I may end up distributing more than 1 Perl application
to the same
host. Is there a way for multiple distributions to share common
libraries (maybe core dlls) so that the file can be even smaller? I
don't mind if the libraries are thrown into
windows/system32/. That's fine.
Just
DZ-Jay wrote:
The above seems to work exactly as I expected. However, being new to
OOP in Perl (but not to OOP or Perl in general!) I wonder if this is
actually the proper way to do it, or if there are some sort of
side-effects that I am not aware of -- or worse -- that the
fact that it
Michael D. Smith wrote:
Is there a right way/best way to check for an internet connection?
A strategy I use:
Have a list of IPs to check, as high-availability as possible. Set a
relatively low timeout for LWP. Loop through the IPs, checking each, and
repeating the loop at least once. If you
[mailto:[EMAIL PROTECTED]
Sent: Thursday, October 27, 2005 5:04 PM
To: Thomas, Mark - BLS CTR; 'perl-win32-users mailing list'
Subject: RE: spidering/crawling/scraping a site..
hi...
decided to try to use the www::checksite::spider to try to
create/write a
quick spider for the http
bruce [mailto:[EMAIL PROTECTED] wrote:
mark...
i'm actually faced with a greater issue. i'm looking to
crawl/extract/download the site. simply scraping each site
doesn't get me
the underlying files for the site, in the correct location/names on my
server, to allow me to kind of replicate
Bruce,
WWW::Mechanize should have no problem with that site. I'd start there. Let
us know if you have any problems doing it.
- Mark.
--
Mark Thomas
Internet Systems Architect
___
BAE SYSTEMS Information Technology
2525 Network Place
Herndon, VA 20171
$Bill Luebkert wrote:
$windoze = 1 if $^O eq 'MSWin32';
Is this going to break on 64-bit Windows? Just curious. Maybe we should all
start using
$windoze = 1 if index($^O, 'MSWin');
- Mark.
--
Mark Thomas
Internet Systems Architect
___
BAE SYSTEMS
I wrote:
$Bill Luebkert wrote:
$windoze = 1 if $^O eq 'MSWin32';
Is this going to break on 64-bit Windows? Just curious. Maybe
we should all start using
$windoze = 1 if index($^O, 'MSWin');
Oops! Index will return 0 in this case. You could use:
$windoze = !index($^O, 'MSWin');
Think about it this way:
There is only one value of zero. Representing it as hex does not change
the value. When the zero is stringified, it is converted to ASCII 30. To get a
specific ASCII character, use chr(). So what you want is the ASCII NUL which is
chr(0).
- Mark.
From:
i've got a php app
Say it isn't so! :)
i finally figured that someone here, might have the exact
soln to my prob!
1. Make sure it is formatted correctly, as per RFC 822. To do that, there is
one big scary regex created by Jeffrey Friedl (author of Mastering Regular
Expressions). If you
Sure. For extra coolness, you could do this via Ajax so that it is validated
on the fly while the user is still filling out the form.
- Mark.
-Original Message-
From: bruce [mailto:[EMAIL PROTECTED]
Sent: Friday, September 16, 2005 11:21 AM
To: Thomas, Mark - BLS CTR; 'perl-win32
I'm using HTML::TokeParser to remove HTML. This functions
very well when tags are contained on one line.
I used to use TokeParser although now I prefer parsing HTML with XPath.
TokeParser is a stream parser--there aren't any problem with newlines.
What happens when you're reading a file line
I can't pass in the entire file. Some of the
files are 60 MB and larger. My machine freezes
and crashes if I do that.
60MB HTML files? How are those being created? Sounds like you may want to
re-think the process.
HTML::Parser can parse a document in chunks; you may be able to take
advantage
Darrell Snedecor wrote:
How can I keep file::find from descending into subfolders of
$DataFolders_Location? I can't get prune to work.
...
find(\DelMiscFiles, $DataFolders_Location );
Why not use readdir()?
___
Perl-Win32-Users mailing list
Problem
If the string does not contain a trailing \ then add one.
$string .= \\ unless $string =~ /\\$/;
or, if you prefer,
$string .= \\ if $string !~ /\\$/;
Or
$string =~ s{\\?$}{\\};
--
Mark Thomas
Internet Systems Architect
___
BAE SYSTEMS
Try this? (untested, minimally edited paste from the module docs)
use WWW::Scraper::ISBN::Amazon_Driver;
$driver = WWW::Scraper::ISBN::Amazon_Driver-new();
$driver-verbosity(1);
$driver-search($isbn);
if ($driver-found) {
my $book = $driver-book();
print
, Mark - BLS CTR
Sent: Monday, August 08, 2005 10:14 AM
To: '[EMAIL PROTECTED]';
perl-win32-users@listserv.activestate.com
Subject: RE: amazon web services/api...
Try this? (untested, minimally edited paste from the module docs)
use WWW::Scraper::ISBN::Amazon_Driver;
$driver = WWW
Then delete all the sheets that start with sheet
$SheetTabName = $Book- Worksheets($_)-{Name};
foreach ( 1...$SheetCnt)
{
$SheetTabName = $Book- Worksheets($_)-{Name};
if ( $SheetTabName =~ /^sheet/i )
{
Bruce,
Search.cpan.org is your friend...
http://search.cpan.org/search?query=amazon
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
John Deighan wrote:
We have a goto in our code. I hate it, but there just isn't a good
switch or case statement in Perl yet
Yes there is, in Perl 5.8. If you're using an older Perl, you can still get
Switch.pm from CPAN.
use Switch;
switch ($val) {
case 1 { print
Hugh Loebner wrote:
foreach my $fhkey ( keys %fh){
open ( $fh{$fhkey}, $fhkey ) ;
}
Nobody mentioned this yet: Since you want your filehandles to be unique, why
not use the key of the hash instead of the value? In other words, change the
above to:
foreach my $fhkey ( keys %fh){
Wow there's been a lot of heavy duty code proposed to do something so
simple. The answer is in how Perl converts between the two.
print is a number if $var eq $var + 0;
print not a number if $var ne $var + 0;
That fails on 1e7.
___
[EMAIL PROTECTED] wrote:
0.00 is not a valid internal representation of a number.
That can only exist as a string.
I think u need to re-read the subject of this thread.
- Mark.
___
Perl-Win32-Users mailing list
John wrote:
its does not work on these servers:
Windows 2000 Pro,
Windows XP pro,
Windows 2000 server pro,
Windows server 2003.
Reason is, the new windows server uses ANSI codes and you CAN'T turn
them off like on a UNIX box. These ANSI codes garble up the
responses to Net::Telnet.
I'd
When Net::Telnet doesn't do what you expect, 99% of the time it's a prompt
issue. Did you set the prompt? The default prompt works with the unix
command line, but you'll have to set it to work with your application.
I highly recommend using the debugging options; they can help you figure out
The code attached works fine on Linux, but not Windows XP
I don't see how it can, with the Windows batch syntax embedded in there.
C:\testsocketrod.pl
As you can see above, the script ran the first time but it
didn't run afterwards nor did it
YAML doesn't support nested hashes. I wish it did.
Yes it does. It supports ANY ARBITRARY perl data structure. I use it
exclusively now instead of Data::Dumper.
--
Mark Thomas
Internet Systems Architect
___
BAE SYSTEMS Information Technology
2525 Network
YAML should work.
http://search.cpan.org/dist/YAML/
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Chris
Sent: Monday, May 02, 2005 10:31 AM
To: perl-win32-users
Subject: Store hash in SQL
All,
I'm looking for a way to store a large hash
Bruce,
Here's a simple module that parses the Python config file format you
specified. Use it like this:
use ParseConfig;
use warnings;
use strict;
my $cfg = ParseConfig-new('viewcvs.conf');
# Print only the specified root
# use $cfg-show() to print the entire
Bruce,
I'm not sure what you're looking for. If something distributed with Gforge
is broken, shouldn't you ask its forum or the authors? Or are you trying to
add functionality that doesn't currently exist?
- Mark.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
I've been using Mail::Sender and looked at Net::SMTP -
is there a way or any other modules to use another
port besides port 25? My isp has shut 25 down.
Have you been connecting directly to the recipient domains? Most ISPs don't
allow that. You should be connecting to your ISP's relay server.
Looking at the source of the module, it looks like you can
define it in your
new() statement:
$smtp = Net::SMTP-new('mailhost', Port = 12345);
Yes, but then there's the slight problem that the receiving mail server has
to be listening on that port :)
I would recommend starting with WWW::Mechanize. It's an easier-to-use layer
on top of LWP with many conveniences for following links, filling out forms,
etc.
Sample code:
use WWW::Mechanize;
my $mech = WWW::Mechanize-new();
$mech-get( $url_to_login_page );
$mech-submit_form(
I should have also mentioned the XMLTV project
(http://sourceforge.net/projects/xmltv) which is a very popular project for
retrieving TV data. The backend, written in Perl, grabs TV data and formats
it into XML. It is used in PVR software such as MythTV. There are many
front-ends, too, such as
I'm trying to display Google search results from within
another site. I've tried DBD::Google (Net::Google) making
direct requests via SOAP::Lite. Both seem to take 3-5 seconds
to produce 10 results (too slow for me). Is their a faster way?
How much of that is startup time? Did you try
Another solution is to use the Iterator design pattern. Not only can you get
the index, but you can peek at the next value, etc. There are several
modules that implement this. Here's one example:
use Array::Iterator;
my $i = Array::Iterator-new([EMAIL PROTECTED]);
while ($i-hasNext) {
print
One way:
use Clone;
$bref = clone ([EMAIL PROTECTED]);
or
@b = @{ clone ([EMAIL PROTECTED]) };
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Its great that it's already done but the bigger question, to
me, is why does it copy a reference in the second example. I
don't get it.
In the first example, it's a list of scalars. The scalars are copied. In the
second example, it's a list of anonymous hash references. The references are
Peter Eisengrein wrote:
OK, I sort of get it. But what hash is it a reference to? If
you wanted to
access or modify the hash directly where is it?
You can modify it through either reference. Maybe the following code will
help you. Other references are 'perldoc perldata', 'perldoc perldsc',
Mike Arms wrote:
Sasi Kiran Kumar Mungamuru wrote:
How Do I compare and get difference of two arrays as my
both arrays carries scalar values and my output should be
stored to another array.
In addition to the excellent responses by $Bill and others
I would add that I use Mark-Jason
Does it _have_ to be windows? I have converted many an old PC into hylafax
(www.hylafax.org) servers. Hylafax works great and has an email-to-fax
gateway service. Lots of nice features. But it works only on Unix/Linux.
- Mark.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL
Dan Jablonsky wrote:
I need to catch an error raised in the script.
Right now the script contains only one line:
#!perl
die(died here);
Unfortunatelly, I can catch an error like file not
found, no permission BUT I CANNOT CATCH THE die().
Any idea how to do it?
The difference is that a file
Any thoughts?
$lines[0] =~/^(.*?,){36}.*?$/
$lines[0] =~ /^[^,](?:*,[^,]*){36}$/
I like Joe's answer, but if you must use a regex this one works:
print scalar(my @commas = $lines[0] =~ /(,)/g);
- Mark.
___
Perl-Win32-Users mailing list
Have you seen the Win32::AD::User module?
http://search.cpan.org/~prefect/Win32-AD-User-0.04/User.pm
It gives you methods to get and set AD user properties via ADSI. The
documentation recommends using Toby Everett's ADSI browser to see what
properties are available:
How about 1.02e12?
If you want to know if it looks like a number to perl, this might be handy:
use Scalar::Util qw(looks_like_number);
print Number if looks_like_number($number);
Scalar::Util is part of the standard library in 5.8.x, I believe.
--
Mark Thomas
Internet Systems Architect
Ordinarily I'd use Expect.pm, but that doesn't seem to have
made it to the ActiveState repository yet, and I've
completely given up on using CPAN here.
Are there any suggestions for an ASPerl-friendly alternative?
If anybody has an alternate approach to this problem, I'm all ears.
My understanding of your problem is different from the other responders. I
believe what you want is the intersection of each row of numbers. If
this is correct, the following works:
#!perl -w
use strict;
use List::Compare;
my @data = (
I am not sure if this is the right list for this question.
Perl-Unix-Users would have been best.
I am working on Windows, and find I keep writing very
short Perl scripts to implement UNIX utilities. I call
them zap_grep, zap_wc, zap_unique, zap_diff, zap_sort.
My versions are very crude
Time::ParseDate
I lost it! I thought it was in the DdP repository.
Where did it go? I just installed this 2 weeks(?) ago with
ppm. Now a search is showing up nothing.
ppm install Time-modules
--
Mark Thomas
Internet Systems Architect
___
BAE SYSTEMS
Well, actuall none of the posts are right. Allthough I
appreciate all the responses.
What you describe is exactly what I gave you. Did it not work for you?
Here's the output using your two-row example:
Intersection: 16,19,50,71,76
Here's the output using your three-row example:
Grakowsky, Richard (ETS: Communications and Network Services) wrote:
$myhash{TeamName}{PCT} - Percentage of wins in DD.D format
[...]
When I dump the information in this hash I would like to have
it ranked by PCT so I tried this...
foreach $team (sort {$a = $b} keys %myhash) {
print
I wish it was that easy, I could have a script ftp and grab
them. Our company is very funny and does not work well
between the different depts, so getting ftp access to a
directory on another computer on the other side of the world
won't happen. How hard is it to do what I stated in my
-Original Message-
From: Ben Conrad [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 03, 2004 7:16 PM
To: 'Thomas, Mark - BLS CTR';
[EMAIL PROTECTED]
Subject: RE: RFC Expunge issue with Net::IMAP::Simple .95
Mark,
Your suggestion did work, however the cmd id is still
given a date string something like
11/03/2004 09:30:27
Is there a perl mod that will turn this into perl's time() in
seconds from day zero?
use Time::ParseDate;
$seconds = parsedate(11/03/2004 09:30:27);
if it's a UK-style date (March 11) then you change the line to
$seconds =
The _process_command() routine processes its 'cmd' arguments in order, so
you should be able to simply reverse it. So, instead of
cmd = [EXPUNGE = $box],
use
cmd = [$box, 'EXPUNGE'],
looks like this has already been reported as a bug:
http://rt.cpan.org/NoAuth/Bug.html?id=8035
Consider
I've controlled Hylafax (www.hylafax.org) for years via Perl, long before
the CPAN module (http://search.cpan.org/~arak/Fax-Hylafax-Client-1.01/)
became available. It's a great product, but it's not for Windows.
Interfax (www.interfax.net) offers faxing as a Web Service. They have sample
Perl
That's one convoluted JAPH!
Thanks.
I like to pick through admirable JAPH's like this in an
attempt to learn more Perl idiosyncrasies [...]
Anyone care to explain what's going on?
How about I tell you how I created it, which I think makes it easier to see
what's going on.
Every JAPH
However - there are more than a few hard references to drive
letters (c:) in config.pm, which I understand is something
read when perl spins up. If so, I'm dead. Is this correct?
Config.pm is written at install time. You must have installed to the C:
drive. Have you tried installing to a
Gives:
0:, 1, 2, 3
1:, 1, 2, 3
2:, 1, 2, 3
3:, 1, 2, 3
Which is what I'd expect, and is designed to put the data
into a csv file.
First, is this the best way to do it, or is there a neater trick?
This is a neat trick:
use Template;
my $template = Template-new || die
Tom Pollard wrote:
(3) the number of items in @pts is length(@pts), or scalar(@pts),
or 1+$#pts, but not $#pts.
You're 2 for 3. length() is for scalars, not arrays.
- Mark.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe:
Gary,
You seem to be having trouble with some code that's needlessly complex. What
is the $cli object? Do you have any control over it? It would probably be
easier to add an addToBlacklist method so you can say:
$cli-addToBlacklist($ip) if (not tolerated($ip));
- Mark.
What I would like is to only include a new IP if
$rejected{$_} $tolerate (which is currently working) and the IP
isn't currently in the original IP list.
my $BlacklistedIPs = $cli-GetBlacklistedIPs();
foreach (keys %rejected)
{
$BlacklistedIPs .= \\e$_ if ($rejected{$_}
Bhuvana,
XML questions are best asked on the perl-XML list. Many Twig users frequent
that list (even the author chimes in from time to time).
I'm not all that familiar with Twig, so what I can do is give you working
XML::LibXML code:
my $doc = XML::LibXML-new-parse_file($ARGV[0]);
my @dl_nodes
Carter, you didn't say what you wanted to add, and where. I'll make the
assumption you want to add a sibling patch node to release version 2.0.
Here are a few options:
OPTION 1
Take another look at XML::Simple. I don't see anything in your XML that
wouldn't be possible to create using
That information pertains only to IIS, whereas the OP said he's running
apache.
As long as I'm responding, I'll hop up on my soapbox a little bit. Feel free
to ignore everything after this sentence.
Mixing code and HTML is a bad idea, in general. It's bad when you put HTML
in code (a la CGI.pm)
This works as intended...
my $arg1 = c:/my_scripts/file.txt;
my $arg2 = c:/my_scripts/another.txt;
my $program = c:/my_scripts/cheese.pl;
my @args = ($arg1, $arg2);
exec $program @args;
HOWEVER, I cannot for the life of me get the following to
work, no matter what I try with \s etc.
That being said, the only difference I see in your two
examples is that the second one has a space in an argument,
which will be seen by the shell as two arguments. You will
need to escape it like my\\ scripts so that a literal
backslash gets through to the shell.
Oops, I was thinking
If the HTML document contains something like this (without line
breaks):
a href=http://etext.lib.virginia.edu/etcbin/toccer-
new2?id=RsvGene.sgmimages=images/modengdata=/texts/
english/modeng/parsedtag=publicpart=all
then it's wrong. It should be written as
a
If the HTML document contains something like this (without line
breaks):
a href=http://etext.lib.virginia.edu/etcbin/toccer-
new2?id=RsvGene.sgmimages=images/modengdata=/texts/
english/modeng/parsedtag=publicpart=all
then it's wrong. It should be written as
a
Shouldn't you be using your Mech object to fetch pages? You seem to be going
back and forth between Mech and LWP, when you don't really need to be using
LWP::UserAgent directly at all (Mech does it behind the scenes).
- Mark.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL
I am trying to write a routine that would print out the
value(s) of the entire variable either it be scalar, hash or array:
use Data::Dumper;
print Dumper(\$variable);
--
Mark Thomas[EMAIL PROTECTED]
Internet Systems Architect DigitalNet, Inc.
I am in need of speeding up a very recursive function;
in perl, it took almost an hour; in C++, it took a few
seconds. I wanted more speed.
More often than not, you can speed up a Perl program considerably by
improving the algorithm you're using. You may not need to drop into C.
Perhaps you
Joe wrote:
my $Num = 010233405560;
my @list = split/(..)/, $Num;
my $last = pop @list;
foreach (@list) {
print $_ is too big, must be 33 or less\n if $_ 33;
}
print $last is too big, must be 52 or less\n if $last 52;
Another way:
my @num = $Num =~ /(\d{2})/g;
my @max =
Jim Guion wrote:
#print \$list[$i]: '$list[$i]'\n; #NOTE: It's a 'string' here!
$list[$i] =~ s/^0//: #Strips the leading zeroes!
#print \$list[$i] now: '$list[$i]'\n; #NOTE: Number now, good!
Wrong and completely unnecessary. Leading zeros have nothing to do with
whether it's a 'string'
1 - 100 of 145 matches
Mail list logo