On 8/31/07, Ken Foskey <[EMAIL PROTECTED]> wrote:
> On Fri, 2007-08-31 at 15:08 -0400, Hunter Barrington wrote:
> > is there a type() function in perl? i need to be able to test the
> > contents of an array and
> > if (type($value)=='string' or type($value)=='int') {print "i win";}
>
> if( $value =
- original Nachricht
Betreff: Re: create a uft8 file
Gesendet: Fr 31 Aug 2007 21:08:08 CEST
Von: "Chas Owens"<[EMAIL PROTECTED]>
> On 8/31/07, Digger <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > I want to create an utf8 file and write some content (like html codes) to
> it.
> > How
Ken Foskey wrote:
On Fri, 2007-08-31 at 18:05 -0700, Chris E. Rempola wrote:
I'm trying to parse qmail-qread data, but don't know how to find the
number of occurrences after a particular string. Here is the data:
+++ Beginning of data +
28 Aug 2
Digger wrote:
Chas Owens wrote:
On 8/31/07, Digger <[EMAIL PROTECTED]> wrote:
I want to create an utf8 file and write some content (like html
codes) to it. How to do it?
Modern Perl handles utf8 natively. You can do things like:
#!/usr/bin/perl
use strict;
use warnings;
open my $fh, ">",
Chris E. Rempola wrote:
I'm trying to parse qmail-qread data, but don't know how to find the
number of occurrences after a particular string. Here is the data:
+++ Beginning of data +
28 Aug 2007 17:00:47 GMT #8807850 41428 <[EMAIL PROTECTED]>
On 8/31/07, Digger <[EMAIL PROTECTED]> wrote:
snip
> Does this mean I need to convert the string to utf8 at first then print it to
> $fh?
> Is there a way that I don't need to convert the string by hand?I mean when
> printing,perl convert it
> to utf8 automaticly.
> Thank again.
snip
It is my, p
> -Original Message-
> From: [EMAIL PROTECTED]
> Sent: Fri, 31 Aug 2007 15:07:21 -0400
> To: [EMAIL PROTECTED]
> Subject: Re: create a uft8 file
>
> On 8/31/07, Digger <[EMAIL PROTECTED]> wrote:
>> Hello,
>>
>> I want to create an utf8 file and write some content (like html codes)
>> to
On Fri, 2007-08-31 at 18:05 -0700, Chris E. Rempola wrote:
> I'm trying to parse qmail-qread data, but don't know how to find the
> number of occurrences after a particular string. Here is the data:
>
> +++ Beginning of data +
> 28 Aug 2007 17:00:4
On Fri, 2007-08-31 at 15:08 -0400, Hunter Barrington wrote:
> is there a type() function in perl? i need to be able to test the
> contents of an array and
> if (type($value)=='string' or type($value)=='int') {print "i win";}
if( $value =~ m/^\d+$/ ) {
print "I am a number\n";
}
--
Ken Foskey
I'm trying to parse qmail-qread data, but don't know how to find the
number of occurrences after a particular string. Here is the data:
+++ Beginning of data +
28 Aug 2007 17:00:47 GMT #8807850 41428 <[EMAIL PROTECTED]>
done remote [EMAIL P
On 8/31/07, Hunter Barrington <[EMAIL PROTECTED]> wrote:
> is there a type() function in perl? i need to be able to test the
> contents of an array and
> if (type($value)=='string' or type($value)=='int') {print "i win";}
You probably meant to use the 'eq' (string equality) comparison
operator in
if you have access to the mysql client and server you don't need any
modules, just use the "load data" sql command with all the requisite
parameters.
if you need to make a perl script for it, just use the standard dbd
(or dbi, i forget currently which is parent to which) module to
connect, then us
"Chas Owens" schreef:
> An article would be redundant, we already have Tom Christiansen's
> masterful article "Far More Than Everything You've Ever Wanted to Know
> about Prototypes in Perl"*. [...]
> * http://library.n0i.net/programming/perl/articles/fm_prototypes/
OK, thanks. I presume it is qu
Hello people..
I have one file with data in CSV where first line is header..
Don't have one module for this?
Thanks :D
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Rob Dixon wrote:
Hunter Barrington wrote:
so i have the following code:
foreach my $node (@tables){
my @rows = $node->look_down(_tag => 'tr');
foreach my $row (@rows){ #grabbing data from each row at this point
my @part_cell = $row->splice_content(3, 1); #part number
Hunter Barrington wrote:
so i have the following code:
foreach my $node (@tables){
my @rows = $node->look_down(_tag => 'tr');
foreach my $row (@rows){ #grabbing data from each row at this point
my @part_cell = $row->splice_content(3, 1); #part number
my $cell = $part
On 8/31/07, Hunter Barrington <[EMAIL PROTECTED]> wrote:
> so i have the following code:
>
> foreach my $node (@tables){
> my @rows = $node->look_down(_tag => 'tr');
> foreach my $row (@rows){ #grabbing data from each row at this point
> my @part_cell = $row->splice_content(3,
On 8/31/07, Hunter Barrington <[EMAIL PROTECTED]> wrote:
> how would i find out what attributes and methods are in a name space?
> for example i have an object in my code and im not sure what type it is,
> what attributes are associated with it, what methods etc etc how can i
> find out. in python
so i have the following code:
foreach my $node (@tables){
my @rows = $node->look_down(_tag => 'tr');
foreach my $row (@rows){ #grabbing data from each row at this point
my @part_cell = $row->splice_content(3, 1); #part number
my $cell = $part_cell[0];
next
On 8/30/07, Pat Rice <[EMAIL PROTECTED]> wrote:
snip
> #!/usr/bin/perl
>
> use strict;
> use warnings;
Good form, keep doing this.
>
> my $data_file = 'myfile/var/log/my.log';
> print "$data_file \n";
>
># Open the file for reading.
> open (DATA, "$data_file") or die "can't open $data_file $!
Chas Owens wrote:
On 8/31/07, Robert Hicks <[EMAIL PROTECTED]> wrote:
Are there any pointers somewhere?
snip
The following url seems like it might be helpful; unfortunately I
can't seem to break my bad habit of debugging with print/printf, so I
haven't tried to use a real debugger with XS code
Hunter Barrington wrote:
is there a type() function in perl? i need to be able to test the
contents of an array and
if (type($value)=='string' or type($value)=='int') {print "i win";}
thats basically what i need to be able to do. if it helps i know ahead
of time that the two type in the array
is there a type() function in perl? i need to be able to test the
contents of an array and
if (type($value)=='string' or type($value)=='int') {print "i win";}
thats basically what i need to be able to do. if it helps i know ahead
of time that the two type in the array will always be a hashref o
On 8/31/07, Digger <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I want to create an utf8 file and write some content (like html codes) to it.
> How to do it? thanks.
snip
Modern Perl handles utf8 natively. You can do things like:
#!/usr/bin/perl
use strict;
use warnings;
open my $fh, ">", "outfile"
Thanks, I solved the problem by following the advice on the second
comment on this page:
http://dev.mysql.com/doc/refman/5.0/en/charset-connection.html
Chas Owens wrote:
On 8/29/07, Karjala <[EMAIL PROTECTED]> wrote:
snip
I'm desperate for a solution, a hint, or if you run Debian to pleas
On 8/29/07, Karjala <[EMAIL PROTECTED]> wrote:
snip
> I'm desperate for a solution, a hint, or if you run Debian to please try
> these short scripts on your machine to tell me whether you're getting
> the same results (or better ones).
snip
Have you tried doing the insert from the mysql command to
On 8/31/07, Robert Hicks <[EMAIL PROTECTED]> wrote:
> Are there any pointers somewhere?
snip
The following url seems like it might be helpful; unfortunately I
can't seem to break my bad habit of debugging with print/printf, so I
haven't tried to use a real debugger with XS code.
http://use.perl.o
"Beginner" schreef:
> Log::Handler looks pretty comprehensive.
Consider also Log::Log4Perl.
http://search.cpan.org/~mschilli/Log-Log4perl/lib/Log/Log4perl/FAQ.pm
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PRO
Somu wrote:
use strict;
use warnings;
use File::Find;
sub rm();
Remove the (). This prototypes the subroutine to force it to have no parameters.
sub rm;
In fact leaving this line out altogether is probably the best option. The
subroutine
doesn't need to be declared early.
my $count=0;
my
On 8/31/07, Somu <[EMAIL PROTECTED]> wrote:
> use strict;
> use warnings;
> use File::Find;
> sub rm();
> my $count=0;
> my @dir = ("F://Hindi/RHTDM");
> find(&rm,@dir);
>
> sub rm(){$count++
> my ($fname)= $_;
> if($fname=~ /mp3/){print "$count $fname"}
> }
PLEASE!!! Before coming to this list an
John W. Krahn wrote:
Gunnar Hjalmarsson wrote:
John W. Krahn wrote:
If the OP were on windows then he won't have been able to use single
quotes for the original.
If I understood it correctly, he wasn't...
Krishnan Hariharan wrote:
>
> I wrote this one liner,
>
> perl -pi -e 's/signal T
Those double dollar signs are formatting errors of my mail server. And
with the code i posted, the error has to be at the if statement in the
rm definition
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
use strict;
use warnings;
use File::Find;
sub rm();
my $count=0;
my @dir = ("F://Hindi/RHTDM");
find(&rm,@dir);
sub rm(){$count++
my ($fname)= $_;
if($fname=~ /mp3/){print "$count $fname"}
}
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://le
Hello.
[EMAIL PROTECTED] (Michael Gale) wrote:
> Hey,
>
> Has anyone had any luck withNTLMauth with LWP ?
I also had the same problem as you.
I found a report.
#9521: Authentication to IIS 5.0 server fails repeatedly with 401
errors
http://rt.cpan.org/Public/Bug/Display.html?id=9521
The
Somu wrote:
It gave the error
Use of uninitialized value in pattern match (m//) at test.pl line 13.
Can't use string ("") as a subroutine ref while "strict refs" in use
at C:/Perl/lib/File/Find.pm line 822.
Please show your code.
Rob
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addition
On 8/31/07, Somu <[EMAIL PROTECTED]> wrote:
> It gave the error
>
> Use of uninitialized value in pattern match (m//) at test.pl line 13.
> Can't use string ("") as a subroutine ref while "strict refs" in use
> at C:/Perl/lib/File/Find.pm line 822.
>
>
> ???
>
> On 8/29/07, Omega -1911 <[EMAIL PRO
Net::Ping has serveral Bugs and is not threatsafe. I posted a fix here
and asked for help to fix and upload to cpan... There is an error in
setting up the dataframe and an error in building the identification
number.
Use net-ping-external or use Backticks and ping.
If you just read a logfile,
On Aug 30, 9:37 pm, [EMAIL PROTECTED] (Daniel Kasak) wrote:
> On Thu, 2007-08-30 at 07:16 -0700, ladder49 wrote:
> > Is there a way to dump the HTML code for a web page? I need to write
> > a script which will collect and summarize content from intranet web
> > pages. By dump, I mean to read it t
It gave the error
Use of uninitialized value in pattern match (m//) at test.pl line 13.
Can't use string ("") as a subroutine ref while "strict refs" in use
at C:/Perl/lib/File/Find.pm line 822.
???
On 8/29/07, Omega -1911 <[EMAIL PROTECTED]> wrote:
> On 8/28/07, Randal L. Schwartz <[EMAIL PRO
Are there any pointers somewhere?
Robert
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On 8/31/07, Rodrigo Tavares <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm doing a script, it run a ping in many computers
> and create a log file.
>
> I need search in log file the word "Destination Host
> Unreachable". So, I have to take below line. After
> using regular expressions taking ferrari.
Hello,
I'm doing a script, it run a ping in many computers
and create a log file.
I need search in log file the word "Destination Host
Unreachable". So, I have to take below line. After
using regular expressions taking ferrari.lab and print
"The host is down !".
example:
PING ferrari.lab (192.
how would i find out what attributes and methods are in a name space?
for example i have an object in my code and im not sure what type it is,
what attributes are associated with it, what methods etc etc how can i
find out. in python there was dir() and type() which was a big help.
anything sim
On 8/31/07, Dr.Ruud <[EMAIL PROTECTED]> wrote:
snip
> This is nice content, but not presented well, so I wonder how many
> people take the time to read and grok it.
>
> Maybe you can transform it into an article, maybe both on this list and
> on PerlMonks?
>
> (and please give away the answers :)
s
Hello,
I want to create an utf8 file and write some content (like html codes) to it.
How to do it? thanks.
GET FREE SMILEYS FOR YOUR IM & EMAIL - Learn more at
http://www.crawler.com/smileys
Works with AIM®, MSN® Messenger, Yahoo!® Mes
"Chas Owens" schreef:
> Martin Barth:
>> Andrew Curry:
>>> That's rubbish,
>>
>> but you get a warning like:
>>
>> main::a() called too early to check prototype at -e line 1.
>>
>> Use Prototypes at the beginning of your file if you want to write the
>> subs at the end.
> snip
>
> This would be a
"Beginner" schreef:
> Adriano Ferreira:
>> use lib qw(/etc/perl);
>
> use lib ('/etc/perl');
The idiom adivised by Adriano is more flexible.
See `perldoc lib`.
Example:
use lib qw(
/usr/local/cvs_tree/lib
/etc/perl
);
--
Affijn, Ruud
"Gewoon is een tijger."
Hello all,
Thanks for your help.
I tried using "\047" ASCII for the single quote in the
substitution and it worked.
The OS am using is Sun Solaris.
Regards,
HK.
--- "John W. Krahn" <[EMAIL PROTECTED]> wrote:
> Gunnar Hjalmarsson wrote:
> > John W. Krahn wrote:
> >> Gunnar Hjalmarsson wrote:
48 matches
Mail list logo