ftps module

2010-07-27 Thread Roman Makurin
Hi All! I need ftps support fo my app, could anyone recomend good opensource module ? Thanks -- If you think of MS-DOS as mono, and Windows as stereo, then Linux is Dolby Digital and all the music is free... pgp6a0G6xWgvN.pgp Description: PGP signature

Re: parse xml with invalid chars

2010-06-05 Thread Roman Makurin
I think i found solution suitable for me. I would wrap all broken texts in CDATA sections, it works perfectly. Thanks for help On Fri, Jun 04, 2010 at 02:05:58PM -0400, Chas. Owens wrote: > On Fri, Jun 4, 2010 at 13:30, Roman Makurin wrote: > > I used mostly the same things, but withou

Re: parse xml with invalid chars

2010-06-04 Thread Roman Makurin
, Chas. Owens wrote: > On Fri, Jun 4, 2010 at 12:23, Roman Makurin wrote: > > Hi, here it is http://pastebin.org/307289 > > > > On Fri, Jun 04, 2010 at 12:06:24PM -0400, Chas. Owens wrote: > >> On Fri, Jun 4, 2010 at 10:16, Roman Makurin wrote: > >> > H

Re: parse xml with invalid chars

2010-06-04 Thread Roman Makurin
Hi, here it is http://pastebin.org/307289 On Fri, Jun 04, 2010 at 12:06:24PM -0400, Chas. Owens wrote: > On Fri, Jun 4, 2010 at 10:16, Roman Makurin wrote: > > Hi all > > > > Last time i have a big problem, i need parse xml files > > which have invalid xml cha

parse xml with invalid chars

2010-06-04 Thread Roman Makurin
Hi all Last time i have a big problem, i need parse xml files which have invalid xml chars outside of CDATA and xml parser hangs everytime on such files. Is there any way to parse such files ??? thanks -- If you think of MS-DOS as mono, and Windows as stereo, then Linux is Dolby Digital and al

best way to get number of elements in list value

2009-09-22 Thread Roman Makurin
Hi All! right now im doing it in following way: $size = @{[func_that_return_list_value]}; is there any best way to do it ? Thanks. -- If you think of MS-DOS as mono, and Windows as stereo, then Linux is Dolby Digital and all the music is free... signature.asc Description: Digital signatur

rfc 822 formated time -> to unix time

2009-08-29 Thread Roman Makurin
Hi All. Is there any more or less standart way to convert string formated according to rfc822 to unix time ? Thanks. -- If you think of MS-DOS as mono, and Windows as stereo, then Linux is Dolby Digital and all the music is free... signature.asc Description: Digital signature

Re: HTML::TreeBuilder - handle invalid html gracefully

2009-08-23 Thread Roman Makurin
On Sun, Aug 23, 2009 at 02:56:44PM +0400, Roman Makurin wrote: > Hi All! > > How can I tell HTML::TreeBuilder to parse invalid html files > gracefully ? Here is an example: > > - > #!/usr/bin/perl > > use strict; > use warnings; > > use HTML::TreeBuilde

HTML::TreeBuilder - handle invalid html gracefully

2009-08-23 Thread Roman Makurin
Hi All! How can I tell HTML::TreeBuilder to parse invalid html files gracefully ? Here is an example: - #!/usr/bin/perl use strict; use warnings; use HTML::TreeBuilder; my $root = HTML::TreeBuilder->new_from_file(*DATA); print +($root->look_down(_tag=>'div', class=>'text'))->as_text, $/;

Re: HTML::TreeBuilder encode symbols as html entities

2009-08-14 Thread Roman Makurin
On Fri, Aug 14, 2009 at 5:35 PM, Shawn H. Corey wrote: > Roman Makurin wrote: >> >> dump result is html encoded entities: >> >> @0.1.5.1 >>  > title="Ссылка ">@0.1.5.1.0 >> >> all html entities are valid unicode code points of symb

HTML::TreeBuilder encode symbols as html entities

2009-08-14 Thread Roman Makurin
Hi All. I have a problem with HTML::TreeBuilder. Here is sample code without any error checking: $ua = new LWP::UserAgent -timeout=>10; $resp = $ua->get($url); $content = decode('encoding_of_web_page', $resp->content); decode_entities($content); $r = HTML::TreeBuilder->new_from_content($conten

Re: localtime() oddities

2009-08-04 Thread Roman Makurin
Big thanks for replying. Just modified my mktime() call : POSIX::mktime(sec, min, hour, month, year, -1, -1, 1); and now it work as expected :) On Mon, Aug 03, 2009 at 08:42:43AM -0400, Shawn H. Corey wrote: > Roman Makurin wrote: >> Could someone explain me whats goin on :) >>

localtime() oddities

2009-08-03 Thread Roman Makurin
Hi All! I have a strange problem. Here is sample code: perl -MPOSIX -le 'print scalar localtime(POSIX::mktime(0,30,14,03,07,109))' When i test it on my laptop, everything goes fine, its output is: Mon Aug 3 14:30:00 2009 But when im trying to execute it on freebsd server it gives me following

lwp content encoding

2009-07-27 Thread Roman Makurin
I have a problem with lwp. When I retrive pages i use decode_content to access html. Which encoding has the result of decoed_content ? my $ua = LWP::UserAgent; my $resp = $ua->get("http://some.url";); die $resp->status_line, $/ unless $resp->is_success; Im using HTML::TreeBuilder to build html tr

friend class in perl

2009-06-24 Thread Roman Makurin
Hi I need create a friend class. Is there any special that I need to know ? For now, I get object and work with it like with ordinary reference with direct access to internal fields. Thanks -- If you think of MS-DOS as mono, and Windows as stereo, then Linux is Dolby Digital and all the music

Re: How to print errors to both STDERR & a file?

2009-06-24 Thread Roman Makurin
On Wed, Jun 24, 2009 at 09:25:05AM -0700, pa...@compugenic.com wrote: > I'd like to automatically have my script's errors and warnings sent to > both STDOUT (console) and a log file. What is the proper way of doing this? print STDERR mess; print FILEHANDLE mess; > > Pablo > > -- > To unsubsc

Re: question about constants

2009-06-24 Thread Roman Makurin
On Wed, Jun 24, 2009 at 03:25:57PM +0200, Jenda Krynicky wrote: > From: Roman Makurin > > here is complite perl script which produces such results without > > any warning: > > > > #!/usr/bin/perl > > > > use strict; > > use warnings; > >

Re: question about constants

2009-06-24 Thread Roman Makurin
On Wed, Jun 24, 2009 at 04:37:52AM +0200, Gunnar Hjalmarsson wrote: > Strange. > > It looks like strictures and warnings are not enabled (@a and @b are not > declared). Try to add > > use strict; > use warnings; > > and see if that makes Perl give you a hint. > here is complite perl scri

Re: question about constants

2009-06-23 Thread Roman Makurin
On Wed, Jun 24, 2009 at 03:02:00AM +0200, Gunnar Hjalmarsson wrote: > Roman Makurin wrote: >> >> use constant { >> A => 1, >> B => 2, >> C => 3 }; >> >> @a = (1, 2, 3); >> @b = (A, B, C); >> >> # first loop &g

question about constants

2009-06-23 Thread Roman Makurin
Hi All today i spend a lot of time with following problem. part of code: use constant { A => 1, B => 2, C => 3 }; @a = (1, 2, 3); @b = (A, B, C); # first loop while(my $i = shift @a) { print $i, $/ } # second loop while(my $i = shift @b) { print $i, $/

Re: question about eval usage

2009-06-23 Thread Roman Makurin
On Tue, Jun 23, 2009 at 07:54:54PM +0200, Paul Johnson wrote: > > >From the docs: http://perldoc.perl.org/perlmodstyle.html#Version-numbering > Big thanks. -- If you think of MS-DOS as mono, and Windows as stereo, then Linux is Dolby Digital and all the music is free... -- To unsubscribe, e

Re: question about eval usage

2009-06-23 Thread Roman Makurin
On Tue, Jun 23, 2009 at 12:46:33PM +0200, Jenda Krynicky wrote: > From: Roman Makurin > > Just looked throught some standart perl modules and found > > something cryptic to myself: > > > > package Module; > > > > $Module::VERSION = '1.0&#x

question about eval usage

2009-06-23 Thread Roman Makurin
Hi all! Just looked throught some standart perl modules and found something cryptic to myself: package Module; $Module::VERSION = '1.0'; $Module::VERSION = eval $Module::VERSION; Why eval part is needed here ? Thanks PS: sorry for my english -- If you think of MS-DOS as mono, and Windows as

Errors in parsing XML

2009-01-31 Thread Roman Makurin
Hi All Im using XML::RSS for parsing RSS feeds, it works fine for most feeds, but sometimes it gives me following error: not well-formed (invalid token) at line 779, column 11, byte 83104 at /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi/XML/Parser.pm line 187 Firefox and other RSS a

Re: Parsing RSS feeds

2009-01-30 Thread Roman Makurin
В Сбт, 31/01/2009 в 09:05 +0200, Erez Schatz пишет: > On 1/31/2009 8:45 AM, Roman Makurin wrote: > > Hi All! > > > > Which is best way to parse(not create) RSS Feeds(0.9, 1.0 and 2.0) in > > perl ? I looked through XML::RSS, but it looks like mostly for creating &g

Parsing RSS feeds

2009-01-30 Thread Roman Makurin
Hi All! Which is best way to parse(not create) RSS Feeds(0.9, 1.0 and 2.0) in perl ? I looked through XML::RSS, but it looks like mostly for creating feeds. Thanks PS: Sorry for my English -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h..

question about "local our"

2008-07-13 Thread Roman Makurin
Hi All! I want to ask whats difference between usage of "local" and "local our" Here is example code: #!/usr/bin/perl use strict; use warnings; our $i = 0; sub t_func1 { local $i = 1; print "\$i = $i\n"; } sub t_func2 { local our $i = 2; print "\$i = $i\n"; }