* Paul Johnson [2008.01.01 22:10]:
> The most direct analogy would be to use an
> in-memory file:
>
> open my $fh, "<", \$scalar;
> print while <$fh>;
Very nice. Thanks.
I didn't understand what John and Chas were trying
to say until I saw the term "in-memory file".
Exactly the kind of stuff I
Hi,
I have a scalar variable $x whose value is "a(b"
I am trying to replace the paranthesis with a backslash followed by
parenthesis, I mean, ( to \(
$x =~ s/\(/\\(/g;
However this is making $x as "a\\(b" which is not what I want.
Can somebody please help me with the regular expression here?
Hi All,
I am a beginner of perl and sorry if I am asking something silly.
I have written the following code using some pre-made scripts on net.
#!/usr/bin/perl
l1:print"Enter your E-Mail ID";
my $from=;
l2:print"Enter receipt's E-Mail ID";
my $to=;
print"Enter Subject";
my $sub=;
Gurpreet Singh wrote:
Hi All,
I am a beginner of perl and sorry if I am asking something silly.
I have written the following code using some pre-made scripts on net.
#!/usr/bin/perl
l1:print"Enter your E-Mail ID";
my $from=;
l2:print"Enter receipt's E-Mail ID";
my $to=;
print"Enter
Murali wrote:
Hi,
Hello,
I have a scalar variable $x whose value is "a(b"
I am trying to replace the paranthesis with a backslash followed by
parenthesis, I mean, ( to \(
$x =~ s/\(/\\(/g;
However this is making $x as "a\\(b" which is not what I want.
Can somebody please help me with the
Murali wrote:
> Hi,
Hello,
> I have a scalar variable $x whose value is "a(b"
>
> I am trying to replace the paranthesis with a backslash followed by
> parenthesis, I mean, ( to \(
>
> $x =~ s/\(/\\(/g;
>
> However this is making $x as "a\\(b" which is not what I want.
>
> Can somebody please he
Gurpreet Singh wrote:
> Hi All,
Hello,
> I am a beginner of perl and sorry if I am asking something silly.
> I have written the following code using some pre-made scripts on net.
>
>
> #!/usr/bin/perl
You should have these two lines next:
use warnings;
use strict;
> l1:print"Enter your E-Mai
Gurpreet Singh wrote:
Hi All,
Hello,
I am a beginner of perl and sorry if I am asking something silly.
I have written the following code using some pre-made scripts on net.
#!/usr/bin/perl
You should have these two lines next:
use warnings;
use strict;
l1:print"Enter your E-Mail ID";
Hi Gurus,
I want to remove duplicate lines across files.
Below is the detailed problem,
I have file1 file2,file3,file4,file5,
The lines in file1 are there in file2,file3,file4,file5 I want to remove
all the lines which are there in file1 from file2,file3,file4,file5.
Can
On Jan 3, 4:10 am, [EMAIL PROTECTED] (Yitzle) wrote:
> Hi.
> I've got two scripts I am running and they both consume large amounts
> of memory (10MB).
> How would I go about finding where the memory is being used and
> figuring out how to reduce the memory footprint.
>
> Both scripts start off with
Siva Prasad wrote:
Hi Gurus,
Hello,
I want to remove duplicate lines across files.
Below is the detailed problem,
I have file1 file2,file3,file4,file5,
The lines in file1 are there in file2,file3,file4,file5 I want to remove
all the lines which are there in file1 from file2,file3,file4,
Siva Prasad wrote:
I want to remove duplicate lines across files.
Below is the detailed problem,
I have file1 file2,file3,file4,file5,
The lines in file1 are there in file2,file3,file4,file5 I want to
remove all the lines which are there in file1 from file2,file3,file4,file5.
Can anyb
On Jan 3, 12:19 am, [EMAIL PROTECTED] (Rob Dixon) wrote:
> If you mean that it doesn't report an error if you write
>
> AddConnection({ RemoteName => 'Nash' });
>
> then it's simply because you haven't asked it to do anything. You don't
> get a local connection to a resource though - nothin
e.g.
apple orange
apple orange
I want to extract "div" from the input
thanks.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
From: yitzle <[EMAIL PROTECTED]>
> Hi.
> I've got two scripts I am running and they both consume large amounts
> of memory (10MB).
> How would I go about finding where the memory is being used and
> figuring out how to reduce the memory footprint.
>
> Both scripts start off with:
>
> #!/usr/bin/p
On Jan 3, 2008 6:19 AM, howa <[EMAIL PROTECTED]> wrote:
> e.g.
>
> apple orange
> apple orange
>
>
> I want to extract "div" from the input
>
> thanks.
Take a look at the various HTML* modules on CPAN. Personally, I like
HTML::TreeBuilder*. It represents the HTML document as a tree of
HTML
On 1月3日, 下午7時19分, [EMAIL PROTECTED] (Howa) wrote:
> e.g.
>
> apple orange
> apple orange
>
> I want to extract "div" from the input
>
> thanks.
This is my current codes:
#
use strict;
my $str = " apple ";
if ($str =~ /<(.*?)>/gi) {
On Jan 3, 2008 8:27 AM, howa <[EMAIL PROTECTED]> wrote:
snip
> And it should handle other rare cases, e.g.
>
> my $str = " apple ";
snip
And right there you showed why regexes are not good for parsing HTML
(and XML). That problem is non-trival and therefore we have modules
that take care of the
On Jan 2, 2008 11:11 PM, Murali <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a scalar variable $x whose value is "a(b"
>
> I am trying to replace the paranthesis with a backslash followed by
> parenthesis, I mean, ( to \(
>
> $x =~ s/\(/\\(/g;
>
> However this is making $x as "a\\(b" which is not wh
On 1月3日, 下午10時00分, [EMAIL PROTECTED] (Chas. Owens) wrote:
> On Jan 3, 2008 8:27 AM, howa <[EMAIL PROTECTED]> wrote:
> snip> And it should handle other rare cases, e.g.
>
> > my $str = " apple ";
>
> snip
>
> And right there you showed why regexes are not good for parsing HTML
> (and XML). That p
On Jan 3, 2008 6:41 AM, howa <[EMAIL PROTECTED]> wrote:
> > And right there you showed why regexes are not good for parsing HTML
> > (and XML). That problem is non-trival and therefore we have modules
> > that take care of the messy parsing that is necessary to get the
> > information you want.
On Jan 2, 2008 8:11 PM, Dr.Ruud <[EMAIL PROTECTED]> wrote:
> Chas. Owens schreef:
snip
> > If you have code that is setting $@ then you have bad code;
>
> eval sets [EMAIL PROTECTED] Not all code that uses eval, is bad code.
> ;-)
snip
When I said "is setting $@" I meant other than by the eval mec
Hi,
I am trying to use h2xs to create a module called Utilities.pm to put
some common function sthat my perl scripts call under one module. I ran
the folliwng command to generate the module skeleton and it failed with
the following errors. I am totally new to perl and any help would be
highl
On Jan 2, 2008 7:27 PM, Nihilism Machine <[EMAIL PROTECTED]> wrote:
> i tried the unsubscribe email and the help email addy for this list, i
> still cant unsubscribe, the emails produce no results/returned emails
> etc. ugh.
That's frustrating. But which is it, no results or returned emails?
Mayb
On Jan 3, 2008 9:41 AM, howa <[EMAIL PROTECTED]> wrote:
> On 1月3日, 下午10時00分, [EMAIL PROTECTED] (Chas. Owens) wrote:
>
> > On Jan 3, 2008 8:27 AM, howa <[EMAIL PROTECTED]> wrote:
> > snip> And it should handle other rare cases, e.g.
> >
> > > my $str = " apple ";
> >
> > snip
> >
> > And right the
On Jan 3, 2008 12:50 PM, Shilpi Harpavat <[EMAIL PROTECTED]> wrote:
> Hi,
> I am trying to use h2xs to create a module called Utilities.pm to put
> some common function sthat my perl scripts call under one module. I ran
> the folliwng command to generate the module skeleton and it failed with
> t
On 1/2/08, Gurpreet Singh <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I am a beginner of perl and sorry if I am asking something silly.
> I have written the following code using some pre-made scripts on net.
> open (MAIL,"|/usr/sbin/sendmail");
> print MAIL "To: $to\n";
If you're providing the reci
On Dec 10 2007, 3:43 am, [EMAIL PROTECTED] (Chas. Owens) wrote:
> On Dec 10, 2007 8:24 AM, Tim Bowden <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Mon, 2007-12-10 at 13:14 +, Beginner wrote:
> > > Hi,
>
> > > I have a huge XML file, 1.7GB, 53080215 lines. I am trying to extract
> > > an attribute fr
From: [EMAIL PROTECTED]
> On Dec 10 2007, 3:43 am, [EMAIL PROTECTED] (Chas. Owens) wrote:
> > On Dec 10, 2007 8:24 AM, Tim Bowden <[EMAIL PROTECTED]> wrote:
> > Unfortunately that won't work with structured data like XML. You best
> > bet is to use something like XML::Twig to grab the top level re
29 matches
Mail list logo