On Tue, 2008-06-24 at 19:37 -0700, John W. Krahn wrote:
> Tim Bowden wrote:
> > Hi,
>
> Hello,
>
> > I'm trying to isolate text in a string. My string is typically of the
> > form:
> > sometext["moretext",
> >
> > I would like to isolate moretext.
> >
> > I tried:
> > #!/usr/bin/perl -w
> > my
$html has nothing from the following code. Could someone help me?
Thanks.
use LWP;
use URI;
$Browser = LWP::UserAgent->new || die "$!";
my $Surfurl = 'http://us.randstad.com/webapp/internet/servlet/
BranchView?b=702';
my @ns_headers = (
'User-Agent' => 'Mozilla/5.0 (Windows; U; Windows NT
I'm trying to click dialog boxes using Win32::IEAutomation::WinClicker-
>new();
I'm having no success in getting this buttons to click in the dialog
boxes.
Below is the code I'm using.
$ie->getButton('caption:', "Add")->Click(1);
my $clicker = Win32::IEAutomation::WinClicker->new(
Leonid L schreef:
> Many of the proposed solutions I've found on Google do not work for
> me, perhaps because they assume Unix/Linux host. I need a sub that
> will reliably tell me whether a given directory is empty (I am running
> Perl on Win XP, NTFS file system). Please give your implementation
On Jun 26, 9:57 am, [EMAIL PROTECTED] (Pat Rice) wrote:
> Hi all
> I'm wondering if there is a nice way to parse this data, as in is
> there any module that could handle this type of data, as in the was it
> is presented? so that I can repeat is itn a tree like structure in
> HTML ?
>
> so I can pi
On Thu, Jun 26, 2008 at 4:21 PM, Aruna Goke <[EMAIL PROTECTED]> wrote:
> David Romero wrote:
>>
>> use a regular expression
>>
>> my $email = 'user!dominio.com';
>> $email =~ s/!/@/g;
>> ###Result [EMAIL PROTECTED]
>>
>> http://www.troubleshooters.com/codecorn/littperl/perlreg.htm
>>
>>
>> On Thu,
Erasmo Perez wrote:
Hi dear list:
Hello,
Thank you very much for you great help in solving my past issue,
regarding the removing of the trailing commas and points.
Thank you very much indeed :-)
Now, my last (I hope) issue.
I got another text file in the following format:
cluster[1] = { 2
Many of the proposed solutions I've found on Google do not work for
me, perhaps because they assume Unix/Linux host. I need a sub that
will reliably tell me whether a given directory is empty (I am running
Perl on Win XP, NTFS file system). Please give your implementation a
quick test on a similar
Has anyone been able to click a span link, if so how to do it?
Source behind my link is:
Add
Partition
is this possible with $ie->getLink?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Erasmo Perez wrote:
Hi dear list:
Hello,
Please forgive my lack of Perl credentials, but i am a complete beginner
But, and that is the problem, I do have an urgent issue and that's why
I came to perl in the very first instance
I have a CSV file, which comes in the following format:
a,b,.,.
yitzle schreef:
> while ( my $line = <> ) {
> $line =~ /cluster\[(\d)+\] = {([\d ]+)}/ or die;
> my @vals = split( / +/, "$1 $2" );
> print join(",", @vals) . "\n";
> }
Less strict alternative:
while (<>) {
my @vals = /([0-9]+)/g or die;
print join(",", @vals) . "\n";
Hello all,
I need to parse IRC logs for IPs. The format would be @ then host
followed by either ) or ], some may contain unwanted spaces. If the host
is not an IP, I would need to have it converted to an IP. The resulting
IPs would then have to be looped through Net::DNSBLLookup, with and
Hi dear Yitzle:
Thank you very much for your great help :-)
Your perl code works great !
The problem was indeed from my side, since I was over-confident in the
(mis)use of blank space (a beginner sin)
But now your code works, thank to your helpful replies and I now i got
my a... neck covered
A
yitzle wrote:
On Thu, Jun 26, 2008 at 11:00 AM, Li, Jialin <[EMAIL PROTECTED]> wrote:
another way to handle the one line input is to read the whole line at once
and then use
regex to extract each column
__CODE__
#!/usr/bin/perl
use strict;
use warnings;
my $label_file = "label.in";
my $thickne
Li, Jialin wrote:
another way to handle the one line input is to read the whole line at once
and then use
regex to extract each column
__CODE__
#!/usr/bin/perl
use strict;
use warnings;
my $label_file = "label.in";
my $thickness_file = "thickness.in";
open my $fp_l, "<", $label_file or die "Ca
On Thu, Jun 26, 2008 at 5:22 PM, <[EMAIL PROTECTED]> wrote:
> Hi Yitzle:
>
> Thank you very much for your suggestion:
>
> Here is my perl file: clusters.pl
>
> #! /usr/bin/perl
> use warnings;
> use strict;
> while (my $line = <>) {
> $line = ~/cluster\[(\d)+\] = {([\d ]+)}/ or die;
> my @vals =
Hi Yitzle:
Thank you very much for your suggestion:
Here is my perl file: clusters.pl
#! /usr/bin/perl
use warnings;
use strict;
while (my $line = <>) {
$line = ~/cluster\[(\d)+\] = {([\d ]+)}/ or die;
my @vals = split(/+/,"$1 $2");
print join(",",@vals). "\n";
}
my input file (clusters.i
David Romero wrote:
use a regular expression
my $email = 'user!dominio.com';
$email =~ s/!/@/g;
###Result [EMAIL PROTECTED]
http://www.troubleshooters.com/codecorn/littperl/perlreg.htm
On Thu, Jun 26, 2008 at 1:35 PM, Aruna Goke <[EMAIL PROTECTED]> wrote:
hi,
i have the this log from my sms
On Thu, Jun 26, 2008 at 3:28 PM, Erasmo Perez <[EMAIL PROTECTED]> wrote:
> Hi dear list:
>
> Thank you very much for you great help in solving my past issue,
> regarding the removing of the trailing commas and points.
>
> Thank you very much indeed :-)
>
> Now, my last (I hope) issue.
>
> I got ano
"Pat Rice" schreef:
> I'm wondering if there is a nice way to parse this data, as in is
> there any module that could handle this type of data, as in the was it
> is presented? so that I can repeat is itn a tree like structure in
> HTML ?
Maybe you are looking for something like this:
#!/usr/bin
Hi dear list:
Thank you very much for you great help in solving my past issue,
regarding the removing of the trailing commas and points.
Thank you very much indeed :-)
Now, my last (I hope) issue.
I got another text file in the following format:
cluster[1] = { 2 3 4 8 10 14 }
cluster[2] = { 25
use a regular expression
my $email = 'user!dominio.com';
$email =~ s/!/@/g;
###Result [EMAIL PROTECTED]
http://www.troubleshooters.com/codecorn/littperl/perlreg.htm
On Thu, Jun 26, 2008 at 1:35 PM, Aruna Goke <[EMAIL PROTECTED]> wrote:
>
> hi,
>
> i have the this log from my sms gateway, howeve
Hi dear Yitzle:
Thank you very much for you suggestion about the sustitution of the
code, required to treat separately the CSV file (from the perl code).
It has worked flawlessly :-)
Thank you (all) very much
Regards
On 26/06/2008, yitzle <[EMAIL PROTECTED]> wrote:
> On Thu, Jun 26, 2008 at 1:
hi,
i have the this log from my sms gateway, however, the inverted
exclamation mark was sent from the smsc as @.
2008-06-26 17:22:35 SMS request sender:+2342019122 request:
'maruna¡ontng.com,test,Love my test message' file answer: ''
2008-06-26 17:27:17 Receive SMS [SMSC:caxt] [SVC:] [ACT:]
On Thu, Jun 26, 2008 at 1:14 PM, <[EMAIL PROTECTED]> wrote:
> Hi dear Jeff:
>
> Thank you very much for your help
>
> Yiur script is working flawlessly
>
> Just another question:
>
> How could I re-write your script in order to treat the __DATA__
> portion of your code as an external file ?
>
> I
Hi dear Jeff:
Thank you very much for your help
Yiur script is working flawlessly
Just another question:
How could I re-write your script in order to treat the __DATA__
portion of your code as an external file ?
I happen to have the whole CSV file and I would not want to mix
directly with it,
Sorry for the multiple replies... This code works. Though I think I
might be doing something "bad". When I comment out the line:
$curNode->{ $nodeName }{ '__PARENT__' } = $curNode;
after the loop, %root is an empty hash. I'm not sure why.
#!/usr/bin/perl
use strict;
use warnings;
use Data::D
This code is a start. It needs some playing with, still.
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
open my $FH, "< t" or die;
my %root = ();
my $depth = 0;
my $curNode = \%root;
while ( my $line = <$FH> )
{
chomp $line;
$line =~ /^(\s*)/;
my $leadingSpace = lengt
On Thu, Jun 26, 2008 at 9:57 AM, Pat Rice <[EMAIL PROTECTED]> wrote:
> Hi all
> I'm wondering if there is a nice way to parse this data, as in is
> there any module that could handle this type of data, as in the was it
> is presented? so that I can repeat is itn a tree like structure in
> HTML ?
>
On Thu, Jun 26, 2008 at 11:00 AM, Li, Jialin <[EMAIL PROTECTED]> wrote:
> another way to handle the one line input is to read the whole line at once
> and then use
> regex to extract each column
>
>
> __CODE__
> #!/usr/bin/perl
> use strict;
> use warnings;
> my $label_file = "label.in";
> my $thic
On Fri, Jun 27, 2008 at 12:26 AM, Erasmo Perez <[EMAIL PROTECTED]> wrote:
>
> a,b,.,.,.,.,.,.,.
> b,c,d,.,.,.,.,.,.
> e,f,g,h,.,.,.,.,.
> i,j,k,l,m,.,.,.,.
>
> and so on
>
> My problem: how could I get rid of the trailing points and commas, so
> the output CSV file could get following neat format
Hi dear list:
Please forgive my lack of Perl credentials, but i am a complete beginner
But, and that is the problem, I do have an urgent issue and that's why
I came to perl in the very first instance
I have a CSV file, which comes in the following format:
a,b,.,.,.,.,.,.,.
b,c,d,.,.,.,.,.,.
e,f
On Thu, Jun 26, 2008 at 11:53 PM, Jeff Peng <[EMAIL PROTECTED]> wrote:
> On Thu, Jun 26, 2008 at 9:57 PM, Pat Rice <[EMAIL PROTECTED]> wrote:
>>
>> \==+Interface :
>>|Link State.Down
>> \==+SCSI Interface :
>
> Is this the info in
On Thu, Jun 26, 2008 at 9:57 PM, Pat Rice <[EMAIL PROTECTED]> wrote:
>
> \==+Interface :
>|Link State.Down
> \==+SCSI Interface :
Is this the info in a text file?
If so I think you must parse it by hand, after that you create the
vikingy wrote:
Hi all,
Hello,
I have two files,one is label file,another is thickness file, they are one
to one correspondence, for example:
the label file is : 2 2 3 2 1 3 4 5
2 5 1 4 ..
the thickness file is:0.3 0.8
On Thu, Jun 26, 2008 at 9:42 AM, yitzle <[EMAIL PROTECTED]>
wrote:
> On Thu, Jun 26, 2008 at 8:18 AM, vikingy <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >
> > I have two files,one is label file,another is thickness file, they are
> one to one correspondence, for example:
> > the label file is :
On Thu, Jun 26, 2008 at 8:18 AM, vikingy <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I have two files,one is label file,another is thickness file, they are one
> to one correspondence, for example:
> the label file is : 2 2 3 2 1 3 4 5
>2 5 1
Hi there,
I have a new ubuntu installed on my machine and I cannot seem to build
the Digest::SHA module. What am I doing wrong?
here are the shell commands with failed output from the Perl CLI.
[EMAIL PROTECTED]:/home/noah# perl -MCPAN -e shell | tee SHA.txt
CPAN: File::HomeDir loaded ok (v
Hi all
I'm wondering if there is a nice way to parse this data, as in is
there any module that could handle this type of data, as in the was it
is presented? so that I can repeat is itn a tree like structure in
HTML ?
so I can pic out the tree like structure and replicate it in some way
so that I
koonom wrote:
#!/usr/bin/perl -w
use LWP::Simple;
use HTML::LinkExtor;
$URL = get("http//www.nytimes.com");
#open (FILE, ">file.txt");
$LinkExtor = HTML::LinkExtor->new(\&link);
Jeff already pointed out your error here^^.
$LinkExtor->parse($URL);
sub links
{
($tag, %links) = @_;
Hi all,
I have two files,one is label file,another is thickness file, they are one
to one correspondence, for example:
the label file is : 2 2 3 2 1 3 4 5
2 5 1 4 ..
the thickness file is:0.3 0.8 0.2 0.1 2.4 0.9 3
new(\&link);
which should be:
new(\&links);
Please add "use strict" at the top of the script.
On Thu, Jun 26, 2008 at 2:06 PM, koonom <[EMAIL PROTECTED]> wrote:
> and then comes the error:use of uninitialized value in subroutine
> entry at ~~ line 12
> what does it mean actually?
--
Jeff Pe
#!/usr/bin/perl -w
use LWP::Simple;
use HTML::LinkExtor;
$URL = get("http//www.nytimes.com");
#open (FILE, ">file.txt");
$LinkExtor = HTML::LinkExtor->new(\&link);
$LinkExtor->parse($URL);
sub links
{
($tag, %links) = @_;
if ($tag eq "a"){
foreach $key (keys %links){
Hello.
I'm using this script below to grab single pages from a site. I then
parse the file, stripping the HTML, leaving plain text, which writes
to that file.
use strict; use HTML::Stripper; use LWP::Simple qw( get ); my
$stripper = HTML::Stripper->new(skip_cdata => 1, strip_ws => 0
44 matches
Mail list logo