org chen wrote:
>
> Hi, There is an string, if each letter in the string is not belong to
> [a-z][A-Z][0-9], I want to change it to "+". eg. my $str = "3ijZ()a";if($str
> !~ /[a-z][A-Z][0-9]/){add code here}print $str; #output will be: 3ijZ++a
> please help me complete this code. Thanksorg
$str
Hi,
Just wanted to show you a small piece of code I have written.Are there
any apparent issues here?
package TWiki::Plugins::DumbPlugin;
use strict;
use vars qw( $VERSION $RELEASE $SHORTDESCRIPTION $debug $pluginName
$NO_PREFS_IN_TOPIC );
$VERSION = '0.1';
$RELEASE = '0.1';
$SHORTDESCR
> -Original Message-
> From: Li, Jialin [mailto:[EMAIL PROTECTED]
> Sent: 26 September 2008 06:16
> To: aa aa
> Cc: beginners@perl.org
> Subject: Re: send die "" to a file
>
> On Thu, Sep 25, 2008 at 11:55 PM, aa aa <[EMAIL PROTECTED]> wrote:
>
> >
> > Hi,
> >
> > I try to open several fi
On Fri, Sep 26, 2008 at 2:26 PM, Manasi Bopardikar <
[EMAIL PROTECTED]> wrote:
> Hi,
>
> Just wanted to show you a small piece of code I have written.Are there
> any apparent issues here?
>
>
>
> package TWiki::Plugins::DumbPlugin;
>
> use strict;
>
> use vars qw( $VERSION $RELEASE $SHORTDESCRIP
> "aa" == aa aa <[EMAIL PROTECTED]> writes:
aa> Hi,
aa> I try to open several files, if one of them failed, my program will die and
then send the died information to a file.
aa> eg.
aa> open(AA, "a.txt") or die "can't open file a.txt\n";
aa> But I want to this string "can't open file
2008/9/26 aa aa <[EMAIL PROTECTED]>:
>
> Hi,
>
> I try to open several files, if one of them failed, my program will die and
> then send the died information to a file.
>
> eg.
> open(AA, "a.txt") or die "can't open file a.txt\n";
>
> But I want to this string "can't open file a.txt\n" print to a
2008/9/26 Manasi Bopardikar <[EMAIL PROTECTED]>:
> Hi,
>
> Just wanted to show you a small piece of code I have written.Are there
> any apparent issues here?
>
Just my thought:
You have neither a new method nor any exported subroutines.
It's not convenient for the caller to run those routines.
Hi all,
Recently I came across a scenario where I need to convert the time from one
timezone to another.
Though that time, I used few websites for the same but I want to know how to
do the same in Perl.
The text below will give the kind of input & output my program requires.
Basically I want th
Amit Saxena wrote:
>
> Recently I came across a scenario where I need to convert the time from one
> timezone to another.
>
> Though that time, I used few websites for the same but I want to know how to
> do the same in Perl.
>
> The text below will give the kind of input & output my program req
On Fri, Sep 26, 2008 at 7:39 PM, Rob Dixon <[EMAIL PROTECTED]> wrote:
> Amit Saxena wrote:
> >
> > Recently I came across a scenario where I need to convert the time from
> one
> > timezone to another.
> >
> > Though that time, I used few websites for the same but I want to know how
> to
> > do th
Amit Saxena <[EMAIL PROTECTED]> asked:
> Recently I came across a scenario where I need to convert the
> time from one timezone to another.
>
> Though that time, I used few websites for the same but I want
> to know how to do the same in Perl.
See http://search.cpan.org/~drolsky/DateTime-0.4304
Hi All!
I'm parsing XML using XML::Parser::Expat
...
$self->{parser}->setHandlers(
Start=>\&OnStartElement,
End=>\&OnEndElement,
Char=>\&OnCharacters);
...
sub OnStartElement
{
my $parser = shift;
my $el
2008/9/26 Vyacheslav Karamov <[EMAIL PROTECTED]>:
> %attrs = shift if @_ > 2;
I doubt this can work correctly.
You may need:
%attrs = @_; # get the leftover arguments as hash's keys/values
or,
%attrs = %{+shift}; # get the third argument which is a hash reference
> But how could
Becaue I am on GSM and sometimes spamed (mean my server is realy busy)
the Mailinglist setup sucks in all directions... And since I get per day
between 500 and 1 MAILER-DAEMON messages I have found this message
accidently in the spamfolder.
- Forwarded message from Mail Delivery Syste
On Fri, 2008-09-26 at 18:02 +0300, Vyacheslav Karamov wrote:
> Hi All!
>
> I'm parsing XML using XML::Parser::Expat
>
> ...
> $self->{parser}->setHandlers(
> Start=>\&OnStartElement,
> End=>\&OnEndElement,
> C
Hi List,
I am doing entity conversion decimal entity (input xml) 2 named
entity(output xml) in perl using HTML::Entities::Numbered. But it's not
returning named entity for some decimal entities. If any body have idea to
avoid the below issue, please share with me.
Ex: Coding.
use HTML::Entities::
Jeff Pang пишет:
2008/9/26 Vyacheslav Karamov <[EMAIL PROTECTED]>:
%attrs = shift if @_ > 2;
I doubt this can work correctly.
You may need:
%attrs = @_; # get the leftover arguments as hash's keys/values
or,
%attrs = %{+shift}; # get the third argument which is a hash
On Fri, 2008-09-26 at 18:49 +0300, Vyacheslav Karamov wrote:
> But if subroutine has only 2 parameters (i.e. tag has no attributes)
>
> %attrs = @_;
>
> gives the warning.
>
It doesn't on my machine. Try:
my %attrs = @_ || ();
--
Just my 0.0002 million dollars worth,
Shawn
Linux is
From: Vyacheslav Karamov <[EMAIL PROTECTED]>
> I'm parsing XML using XML::Parser::Expat
>
> ...
> $self->{parser}->setHandlers(
> Start=>\&OnStartElement,
> End=>\&OnEndElement,
> Char=>\&OnCharacters);
>
> ..
These first four lines are how every Perl script I write starts.
#!/usr/bin/perl -T
use strict;
use warnings;
use diagnostics -verbose;
my ($oldfile) = $ARGV[0] =~ /^([-a-zA-Z0-9._\/]+)$/;
die "bad old filename" unless $oldfile;
my ($newfile) = $ARGV[1] =~ /^([-a-zA-Z0-9._\/]+)$/;
die "bad new f
s!(<|)!$1\L$2\E!g;
or
s/(<|<\/)([^!][A-Z0-9 ]+>)/$1\L$2\E/g;
The RE above captures and replaces all HTML tags with lowercase as
desired except for any tag that has only one letter such as ,
or
It will get the , and
It properly ignores the tag
What is the correct way to write the above RE
Vyacheslav Karamov wrote:
>
> I'm parsing XML using XML::Parser::Expat
>
> ...
> $self->{parser}->setHandlers(
> Start=>\&OnStartElement,
> End=>\&OnEndElement,
> Char=>\&OnCharacters);
>
> ...
> sub OnStartE
Jack Gates wrote:
These first four lines are how every Perl script I write starts.
#!/usr/bin/perl -T
use strict;
use warnings;
use diagnostics -verbose;
my ($oldfile) = $ARGV[0] =~ /^([-a-zA-Z0-9._\/]+)$/;
die "bad old filename" unless $oldfile;
my ($newfile) = $ARGV[1] =~ /^([-a-zA-Z0-9._\/]
Jack Gates wrote:
>
> s!(<|)!$1\L$2\E!g;
> or
> s/(<|<\/)([^!][A-Z0-9 ]+>)/$1\L$2\E/g;
>
> The RE above captures and replaces all HTML tags with lowercase as
> desired except for any tag that has only one letter such as ,
> or
>
> It will get the , and
>
> It properly ignores the tag
>
>
Jack Gates wrote:
s!(<|)!$1\L$2\E!g;
or
s/(<|<\/)([^!][A-Z0-9 ]+>)/$1\L$2\E/g;
The RE above captures and replaces all HTML tags with lowercase as
desired except for any tag that has only one letter such as ,
or
It will get the , and
It properly ignores the tag
What is the correct way
On Friday 26 September 2008 01:20:29 pm Rob Dixon wrote:
> Jack Gates wrote:
> > s!(<|)!$1\L$2\E!g;
> > or
> > s/(<|<\/)([^!][A-Z0-9 ]+>)/$1\L$2\E/g;
> >
> > The RE above captures and replaces all HTML tags with lowercase
> > as desired except for any tag that has only one letter such as
> > , or
On Friday 26 September 2008 01:23:23 pm John W. Krahn wrote:
> Jack Gates wrote:
> > s!(<|)!$1\L$2\E!g;
> > or
> > s/(<|<\/)([^!][A-Z0-9 ]+>)/$1\L$2\E/g;
> >
> > The RE above captures and replaces all HTML tags with lowercase
> > as desired except for any tag that has only one letter such as
> > ,
On Friday 26 September 2008 12:48:14 pm Jack Gates wrote:
> s!(<|)!$1\L$2\E!g;
> or
> s/(<|<\/)([^!][A-Z0-9 ]+>)/$1\L$2\E/g;
>
> The RE above captures and replaces all HTML tags with lowercase
> as desired except for any tag that has only one letter such as
> , or
>
> It will get the , and
>
>
Jack Gates wrote:
> On Friday 26 September 2008 01:20:29 pm Rob Dixon wrote:
>> Jack Gates wrote:
>>> s!(<|)!$1\L$2\E!g;
>>> or
>>> s/(<|<\/)([^!][A-Z0-9 ]+>)/$1\L$2\E/g;
>>>
>>> The RE above captures and replaces all HTML tags with lowercase
>>> as desired except for any tag that has only one lett
Jack Gates wrote:
> On Friday 26 September 2008 01:23:23 pm John W. Krahn wrote:
>> Jack Gates wrote:
>>> s!(<|)!$1\L$2\E!g;
>>> or
>>> s/(<|<\/)([^!][A-Z0-9 ]+>)/$1\L$2\E/g;
>>>
>>> The RE above captures and replaces all HTML tags with lowercase
>>> as desired except for any tag that has only one
On Friday 26 September 2008 02:52:45 pm Rob Dixon wrote:
> Jack Gates wrote:
> > On Friday 26 September 2008 01:20:29 pm Rob Dixon wrote:
> >> Jack Gates wrote:
> >>> s!(<|)!$1\L$2\E!g;
> >>> or
> >>> s/(<|<\/)([^!][A-Z0-9 ]+>)/$1\L$2\E/g;
> >>>
> >>> The RE above captures and replaces all HTML tag
Rob Dixon wrote:
Jack Gates wrote:
s!(<|)!$1\L$2\E!g;
or
s/(<|<\/)([^!][A-Z0-9 ]+>)/$1\L$2\E/g;
The RE above captures and replaces all HTML tags with lowercase as
desired except for any tag that has only one letter such as ,
or
It will get the , and
It properly ignores the tag
What i
On Friday 26 September 2008 03:00:15 pm Rob Dixon wrote:
> Jack Gates wrote:
> > On Friday 26 September 2008 01:23:23 pm John W. Krahn wrote:
> >> Jack Gates wrote:
> >>> s!(<|)!$1\L$2\E!g;
> >>> or
> >>> s/(<|<\/)([^!][A-Z0-9 ]+>)/$1\L$2\E/g;
> >>>
> >>> The RE above captures and replaces all HTML
Jack Gates wrote:
On Friday 26 September 2008 12:48:14 pm Jack Gates wrote:
s!(<|)!$1\L$2\E!g;
or
s/(<|<\/)([^!][A-Z0-9 ]+>)/$1\L$2\E/g;
The RE above captures and replaces all HTML tags with lowercase
as desired except for any tag that has only one letter such as
, or
It will get the , and
Jack Gates wrote:
> On Friday 26 September 2008 02:52:45 pm Rob Dixon wrote:
>> Jack Gates wrote:
>>> On Friday 26 September 2008 01:20:29 pm Rob Dixon wrote:
Jack Gates wrote:
> s!(<|)!$1\L$2\E!g;
> or
> s/(<|<\/)([^!][A-Z0-9 ]+>)/$1\L$2\E/g;
>
> The RE above captures and
John W. Krahn wrote:
> Rob Dixon wrote:
>> Jack Gates wrote:
>>> s!(<|)!$1\L$2\E!g;
>>> or
>>> s/(<|<\/)([^!][A-Z0-9 ]+>)/$1\L$2\E/g;
>>>
>>> The RE above captures and replaces all HTML tags with lowercase as
>>> desired except for any tag that has only one letter such as ,
>>> or
>>>
>>> It wi
On Friday 26 September 2008 03:11:48 pm Rob Dixon wrote:
> That's fine, I shall stop trying to help you altogether. You are
> very rude and don't want to accept correction.
>
> Rob
You are the rude one. You don't read what is written and you ignore
simple requests that are in plain sight.
Becaus
On Friday 26 September 2008 03:12:12 pm John W. Krahn wrote:
> Jack Gates wrote:
> > On Friday 26 September 2008 12:48:14 pm Jack Gates wrote:
> >> s!(<|)!$1\L$2\E!g;
> >> or
> >> s/(<|<\/)([^!][A-Z0-9 ]+>)/$1\L$2\E/g;
> >>
> >> The RE above captures and replaces all HTML tags with
> >> lowercase a
That was somewhat strange.
For better solution you may ask to this module's author.
On Fri, Sep 26, 2008 at 9:46 PM, V.Ramkumar
<[EMAIL PROTECTED]> wrote:
>
> Tool output:
> Ḥ Ḥ
>
>
> Expected output:
> Ḥ &Hdb;
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional comm
39 matches
Mail list logo