Re: A multi line pattern match question

2016-07-14 Thread Charles DeRykus
One easier approach: use Tie::File; tie( my @array, 'Tie::File', "/path/to/file" ) or die $!; my $n = 0; while ( $n <= $#array ) { if ( $array[$n] =~ /.*[Oo]rder deny,allow(.*)/ and $n < $#array and $array[$n+1] =~ /[\Dd]eny from all(.*)/ ) { $n

Re: unexpected escaping

2016-01-29 Thread Charles DeRykus
On Fri, Jan 29, 2016 at 12:39 AM, Jorge Almeida wrote: > Can someone help me to understand this? > > #!/usr/bin/perl > use strict; > use warnings; > my $s='\\n'; > print $s; > > > Output: > \n > > Expected output: > \\n > > > Jorge Almeida > From: perldoc perlop q/STRING/

Re: access hash in specific sequence

2015-09-03 Thread Charles DeRykus
ure 'say'; tie( my %pagetypes, 'Tie::IxHash') or die $!; %pagetypes=( 'Delivery Note' => ..., Foo=>, Bar=>); foreach my $pagetype (keys %pagetypes) { ... } say $pagetypes{'Delivery Note'}{weight}; -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Display a hash in the order of an array

2015-07-20 Thread Charles DeRykus
possibility: ... for foreach my $entry ( @{$ordered{$ip}} ) { while ( my($date, $data) = each %{$entry} ) { say join( ,$date:, $data-{ip}, $data-{action} ); } } -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional

Re: Display a hash in the order of an array

2015-07-17 Thread Charles DeRykus
\%ordered; Leaving exact details of printing as an exercise for reader... -- Charles DeRykus On Fri, Jul 17, 2015 at 6:11 AM, Vincent Lequertier s...@riseup.net wrote: Hi, I have the following structure : $hash{$date} = { 'ip' = $ip, 'action

Re: Debugging and passing constant value at run time

2015-07-07 Thread Charles DeRykus
my $DEBUG; ($DEBUG = shift) //= 0; # no debug if no arg missing ... if ($DEBUG) { ... } -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: catching utf8 errors

2015-03-14 Thread Charles DeRykus
=~ /does not map to Unicode/) { # take action. } } -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: An issue of Scope that I do not understand

2015-02-28 Thread Charles DeRykus
++]; ... }; foreach $task (@tasks) { if (...) $report_statics-(); else $report_dynamic-(); ... } But with everything in lexical scope, you could just pass any needed arg's directly and eliminate the closure altogether. -- Charles DeRykus -- To unsubscribe, e

Re: An issue of Scope that I do not understand

2015-02-27 Thread Charles DeRykus
-[$iter++]; ... #MAIN_CODE START foreach $task (@tasks) { if ( ) $report_static-(\@tasks); ... else $report_dynamic-(\@tasks); ... } } -- Charles DeRykus -- To unsubscribe, e-mail: beginners

Re: Debug when script WILL NOT RUN

2015-02-01 Thread Charles DeRykus
) { ^ 12: To save a full .LOG file rerun with -g --- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Looping regexes against a list

2015-01-20 Thread Charles DeRykus
gallery :) -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: should this old forumulation still work?

2015-01-20 Thread Charles DeRykus
On Tue, Jan 20, 2015 at 9:12 PM, Uri Guttman u...@stemsystems.com wrote: On 01/20/2015 11:28 PM, Charles DeRykus wrote: ... or something odd my $contents = do { local $/; map { chomp } HANDLE }; I'm afraid this, while appealing, in my testing generates an incorrect result, ie, 1

Re: should this old forumulation still work?

2015-01-20 Thread Charles DeRykus
in the returned value. Remember, map has tossed all but the final value at this point so it just returns 1. Clear as mud? /SPECULATION -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h

Re: Parsing multi column files

2015-01-18 Thread Charles DeRykus
]' -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Using regular expressions to populate a variable?

2015-01-18 Thread Charles DeRykus
context . -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: How does opendir/readdir process files

2015-01-13 Thread Charles DeRykus
... I think the normal and original behavior is no reference. I think they added the reference in 5.14 too. Perhaps the documentation just fails to mention that support for arrays was added in 5.14 along with references? Hopefully I got that right this time. :) Ah, RTFM would've helped ...

Re: How does opendir/readdir process files

2015-01-09 Thread Charles DeRykus
On Fri, Jan 9, 2015 at 10:31 AM, Brandon McCaig bamcc...@gmail.com wrote: Charles: On Fri, Jan 9, 2015 at 12:46 PM, Charles DeRykus dery...@gmail.com wrote: On Fri, Jan 9, 2015 at 3:39 AM, Dermot paik...@gmail.com wrote: I think John has answered your immediate question. ... for (0

Re: How does opendir/readdir process files

2015-01-09 Thread Charles DeRykus
On Fri, Jan 9, 2015 at 3:39 AM, Dermot paik...@gmail.com wrote: I think John has answered your immediate question. ... for (0..$#files) { print $_) $files[$_]\n; } Alternatively (at least since 5.14) : say $k) $v while ($k,$v) = each @files; -- Charles DeRykus -- To unsubscribe, e

Re: Get return value when running cmd like this

2015-01-05 Thread Charles DeRykus
/; my @cmd =(rsnapshot); run( \@cmd, \undef, \$out, \$err) or die run: $!; say out:$out \nerr:$err' -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Match HTML div ...... /dv string over multiple

2014-11-18 Thread Charles DeRykus
).*? /div }six; { local($/); my $content = DATA; # substitute your lexical filehandle while ( $content =~ /$regex/g) { print table=$1; } } -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e

Re: masks earlier declaration in same scope

2014-10-13 Thread Charles DeRykus
in a conditional all in a one-liner? Do you know for instance that my @foo = $some_scalar is the equivalent of just saying: my @foo = ($some_scalar). So, just a few thoughts... some more explanation of what that code is intended to do would help. -- Charles DeRykus -- To unsubscribe, e-mail

Re: return the list content

2014-09-12 Thread Charles DeRykus
in error IIRC. What happens is perl's internal array structure for @x is marked inaccessible when the sub exits.This enables the struct to be more quickly resurrected on subsequent calls. Scope is preserved without doing extra work on re-entry. Note the IIRC. Corrections welcome. -- Charles

Re: Embed perl interpreter and call C function from perl?

2014-08-20 Thread Charles DeRykus
to export the plugin API into the Perl world to make it possible to write plugins in Perl. You might want to try the XS specific newsgroup: lists.perl.org/list/perl-xs.html Or, if that group hat den Loeffel abgegeben, perlmonks.org HTH, Charles DeRykus -- To unsubscribe, e

Re: one line script for word count

2014-06-30 Thread Charles DeRykus
of context, eg, perldoc perldata. You could alter context, ie, change if to while, to get the correct count: $c++ while $line =~ /\s\w+\s/g; -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http

Re: one line script for word count

2014-06-30 Thread Charles DeRykus
On Mon, Jun 30, 2014 at 1:41 PM, Charles DeRykus dery...@gmail.com wrote: On Mon, Jun 30, 2014 at 11:57 AM, Sunita Pradhan sunita.pradhan.2...@hotmail.com wrote: Hi I want to count number of occurrences of one word in a line within one single line of perl script . My code : $c

Re: one line script for word count

2014-06-30 Thread Charles DeRykus
On Mon, Jun 30, 2014 at 1:53 PM, Charles DeRykus dery...@gmail.com wrote: On Mon, Jun 30, 2014 at 1:41 PM, Charles DeRykus dery...@gmail.com wrote: On Mon, Jun 30, 2014 at 11:57 AM, Sunita Pradhan sunita.pradhan.2...@hotmail.com wrote: You could alter context, ie, change if to while

Re: Need to Grep only fail count from the Pattern.

2014-06-24 Thread Charles DeRykus
Vernekar vernekaru...@gmail.com wrote: Thanks everybody will work out the Feasible option from all these..Thanks a lot On Mon, Jun 23, 2014 at 10:12 PM, Charles DeRykus dery...@gmail.com wrote: On Mon, Jun 23, 2014 at 2:42 AM, Uday Vernekar vernekaru...@gmail.com wrote: Hi All, I

Re: Need to Grep only fail count from the Pattern.

2014-06-23 Thread Charles DeRykus
Another way: while ( DATA) { ... my $fail_count - ( split( /\|/, $_ ) )[-2]; ... } See: perldoc -f split -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: File checks

2014-05-22 Thread Charles DeRykus
) { say $fname is a plain file; } Is there a simpler way to do this? Potentially shorter and arguably simpler if you use the special underscore argument to access file info for previous test, eg, if ( -f $fname and not -l _ ) { say... } -- Charles DeRykus -- To unsubscribe, e-mail

Re: Fail to match mixed quote pattern

2014-03-14 Thread Charles DeRykus
= qr/(|').*?\g{1}/; my @array; while (my $line = $file){ while($line =~ /$pattern/pg) { push (@array, ${^MATCH}); } } -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: regex and parse

2014-03-11 Thread Charles DeRykus
(Perl reg exp tutorial) perlre (Perl regular expressions, the rest of the story) .-- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: perl regexp performance - architecture?

2014-02-17 Thread Charles DeRykus
-computational-x86_64/boost141-regex-1.4.0-2.el5.x86_64.rpm.html HTH, Charles DeRykus

Fwd: perl regexp performance - architecture?

2014-02-17 Thread Charles DeRykus
On Mon, Feb 17, 2014 at 4:25 PM, Phil Smith philbo...@gmail.com wrote: On Mon, Feb 17, 2014 at 6:16 PM, Charles DeRykus dery...@gmail.comwrote: On Mon, Feb 17, 2014 at 12:41 PM, Phil Smith philbo...@gmail.com wrote: I'm currently loading some new servers with CentOS6 on which perl5.10

Re: OO perl programming

2014-02-05 Thread Charles DeRykus
And, then go on to other suggested sources... or not :) TIMTOWDI -- Charles DeRykus

Re: mv Is Not Working the Same Way Under System as Under a Shell.

2014-01-30 Thread Charles DeRykus
, easier and more transparent than deciphering shell error returns, and enables you to avoid the nasty quoting issues of a 'system' call: use File::Copy; move( $file1, $file2) or die move: $!; See: perldoc File::Copy -- Charles DeRykus

Re: perlre(1) and substitution evaluations

2013-11-30 Thread Charles DeRykus
expressions are used in matchings of m//, operations, plus various examples of the same, see discussions of m//, s///, qr// and ?? in Regexp Quote-Like Operators in perlop.ls of Modifiers quoted constructs in perlop -- Charles DeRykus -- Charles DeRykus

Re: perlre(1) and substitution evaluations

2013-11-30 Thread Charles DeRykus
On 11/30/2013 5:16 AM, Lars Noodén wrote: On 11/30/2013 02:55 PM, Charles DeRykus wrote: [ .. Thanks. I see those in perlop and perlfunc. In perlfunc, it is grouped as Regular expressions and pattern matching though that man page just points to perlop. A really clear description in perlre

Re: Need help with a programming problem

2013-10-03 Thread Charles DeRykus
On Wed, Oct 2, 2013 at 5:10 PM, Peter Holsberg pjh42atpobox@gmail.comwrote: Charles DeRykus has written on 10/2/2013 5:49 PM: Wouldn't a manual edit be easier... or is this a recurrent problem? If recurrent, a messy solution may be possible but fragile unless the html formatting

Re: How Much is Too Much? (WAS: formatting a list)

2013-10-02 Thread Charles DeRykus
On Wed, Oct 2, 2013 at 1:58 AM, James Griffin j...@kontrol.kode5.net wrote: * Shawn H Corey shawnhco...@gmail.com [2013-10-01 17:34:06 -0400]: On Tue, 1 Oct 2013 14:14:16 -0700 Charles DeRykus dery...@gmail.com wrote: I'm not bucking for net nanny but, while full solutions

Re: formatting a list

2013-10-01 Thread Charles DeRykus
). -- Charles DeRykus

Re: Sleep

2013-09-16 Thread Charles DeRykus
On Sun, Sep 15, 2013 at 6:59 PM, Charles DeRykus dery...@gmail.com wrote: left: , $start+$sleep -time() }; ... Actually, this is wrong because if sleep(3) is interrupted by any signal it will return, so something like this should work, eg my $secs_to_sleep = 60; my $start = time(); my $end

Re: parsing html

2013-08-08 Thread Charles DeRykus
would be grinding out more code. -- Charles DeRykus

Re: Convert any date format to ISO

2013-07-27 Thread Charles DeRykus
On Fri, Jul 26, 2013 at 4:45 AM, Perl Beginners beginners@perl.org wrote: On 07/25/2013 04:40 PM, Charles DeRykus wrote: On Wed, Jul 24, 2013 at 10:56 PM, Michael Brader mbra...@internode.com.au mailto:mbra...@internode.com.**aumbra...@internode.com.au wrote: On 07/25/2013 10:14

Re: url_encode for LWP POST

2013-07-25 Thread Charles DeRykus
this is with HTTP::Request::Common which will handle escaping the form parameters for you, eg, use HTTP::Request::Common; use LWP::UserAgent; $ua-request( POST 'http://rt.cpan.org/Public/Dist/Display.html' [ Status = ..., Name=... ] ); -- Charles DeRykus

Re: Convert any date format to ISO

2013-07-25 Thread Charles DeRykus
, fmt2=... } ); -- Charles DeRykus

Re: last

2013-06-28 Thread Charles DeRykus
useful for quickly generating reports: [...snip] ... Hm, this wasn't an argument for exclusive either/or usage at all. Rather I was making a case that do in limited cases could be a shorter and/or slightly clearer idiom. -- Charles DeRykus

Re: last

2013-06-28 Thread Charles DeRykus
On Fri, Jun 28, 2013 at 1:21 AM, Dr.Ruud rvtol+use...@isolution.nl wrote: On 28/06/2013 09:08, Charles DeRykus wrote: [...] I was making a case that do in limited cases could be a shorter and/or slightly clearer idiom. I think the context was if you would ever go as far as using double

Re: last

2013-06-27 Thread Charles DeRykus
-e 'do {$in =; ... } until $in =~ /q/' vs. perl -e 'while ( $in = ; ... ) { ... last if $in =~ /q/}' -- Charles DeRykus

Re: Handling special characters in peoples names in XML

2013-06-25 Thread Charles DeRykus
$decoder-name;#--- utf8 -- Charles DeRykus

Re: Perl error codes and warnings

2013-05-28 Thread Charles DeRykus
are fairly intuitive but you can add: use diagnostics qw/-verbose/; for added explanations. -- Charles DeRykus

Re: Can't close filehandle

2013-05-01 Thread Charles DeRykus
: '' at... -- Charles DeRykus

Re: Can't close filehandle

2013-05-01 Thread Charles DeRykus
On Wed, May 1, 2013 at 12:57 PM, Manfred Lotz manfred.l...@arcor.de wrote: On Wed, 1 May 2013 12:00:18 -0700 Charles DeRykus dery...@gmail.com wrote: ... Thanks for your detailed explanations. I think that close should work as I cannot see any reason why a failure of a command closes

Re: Can we use string as variable name

2013-04-30 Thread Charles DeRykus
On Tue, Apr 30, 2013 at 10:07 AM, Piyush Verma 114piy...@gmail.com wrote: Hi,I want to use string as a variable name, please explain if there is any way in perl. ... This is a FAQ. See: http://perldoc.perl.org/perlfaq7.html#How-can-I-use-a-variable-as-a-variable-name ? -- Charles

Re: Any alternative for substr() function

2013-04-13 Thread Charles DeRykus
::NYTProf, I need to check if my SA if he will allow me to install You can usually just install the module under your own directory... See: perldoc -q How do I keep my own module/library directory? -- Charles DeRykus

Re: no warnings inside a loop

2013-04-03 Thread Charles DeRykus
: ... use warnings; my @a; { no warnings; my $b = @a[0]; } my $c = @a[0]; The code in the enclosing block has warnings enabled, but the inner block has them disabled. ... -- Charles DeRykus

Re: IPC::Open3 Usage

2013-03-21 Thread Charles DeRykus
On Thu, Mar 21, 2013 at 6:41 PM, Charles DeRykus dery...@gmail.com wrote: On Thu, Mar 21, 2013 at 3:12 PM, Dominik Danter domi...@foop.at wrote: Hi I just don't understand the perlfaq example. All I want is to capture output of an external command's stdout and stderr. Here is what I've tried

Re: Mechanize: first attempt at scraping (should be something trivial)

2013-03-13 Thread Charles DeRykus
$agent-success; ; print content: $a-content; -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Mechanize: first attempt at scraping (should be something trivial)

2013-03-13 Thread Charles DeRykus
errors so if it couldn't fetch content, your program dies before mech ran occurs. Only if you said $agent-new(autocheck=0), would you see it. You can see the differing output in these: $agent-new(autocheck=0); # toggle 0/1 $agent-get(http://nowhere.com/nono;); print mech ran; -- Charles DeRykus

Re: Return values more than 256?

2013-03-08 Thread Charles DeRykus
but the pipe close needs to be checked first and then subsequently the child return as another poster demonstrated: close $trexe or warn $! ? Error closing $tr pipe: $! : Exit status $? from $tr; -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr

Re: Non interactive interaction

2013-02-28 Thread Charles DeRykus
)machine so yes I'm root I want to do this on a system wide basis. I haven't used it but App::cpanminus may be a help: http://search.cpan.org/~miyagawa/App-cpanminus-1.6002/lib/App/cpanminus.pm -- Charles DeRykus to do -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional

Re: other ways to parse emails from html?

2013-01-31 Thread Charles DeRykus
, no matter if it appears in a link or not, probably the easiest way would be to use regular expressions. Or search on CPAN if there is a module that does that easier. -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h

Re: trying to understand HTML::TreeBuilder::XPath

2013-01-28 Thread Charles DeRykus
*possibly* fail. ;) A module is a good idea since URI will parse a valid mailto and ignore leading whitespace. Note however there may be multiple comma separated emails. See: perldoc URI. my $uri = URI-new($link); if ( $uri-scheme eq 'mailto') { my $email = $uri-path; ... } -- Charles

Re: character setts in a regexp

2013-01-14 Thread Charles DeRykus
On Sat, Jan 12, 2013 at 12:56 PM, Charles DeRykus dery...@gmail.com wrote: On Fri, Jan 11, 2013 at 2:01 PM, Christer Palm b...@bredband.net wrote: Hi! I have a perl script that parses RSS streams from different news sources and experience problems with national characters in a regexp

Re: Line-oriented socket I/O using select()

2013-01-13 Thread Charles DeRykus
programming but you may want to invest in learning POE: https://poe.perl.org It's already refined many of the wheels you'll need and appears well documented. -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org

Re: character setts in a regexp

2013-01-12 Thread Charles DeRykus
) -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: substitution: interpolate capture buffer into variable?

2012-12-26 Thread Charles DeRykus
; -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Help with a regex

2012-12-21 Thread Charles DeRykus
to the unwanted \ would be $user =~ tr/\\//d; -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Retry function?

2012-12-13 Thread Charles DeRykus
On Thu, Dec 13, 2012 at 8:09 AM, Alvin Ramos w...@theflux.net wrote: Any one have any suggestions of a module/function/method to write a perl script to try pinging a server then after the 3rd time to send an email? Thanks in advance... perldoc Net::Ping -- Charles DeRykus

Re: How to display UTF-8 output to command shell in Win7?

2012-12-01 Thread Charles DeRykus
-- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: How to display UTF-8 output to command shell in Win7?

2012-12-01 Thread Charles DeRykus
On Sat, Dec 1, 2012 at 9:58 PM, Charles DeRykus dery...@gmail.com wrote: ... On the command line, I believe you just redirecto to nul: chch 2nul ^^^ chcp -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org

Re: How to display UTF-8 output to command shell in Win7?

2012-12-01 Thread Charles DeRykus
On Sat, Dec 1, 2012 at 10:06 PM, boB Stepp robertvst...@gmail.com wrote: On Sat, Dec 1, 2012 at 11:58 PM, Charles DeRykus dery...@gmail.com wrote: On Sat, Dec 1, 2012 at 8:50 PM, boB Stepp robertvst...@gmail.com wrote: What I would like to do is make chcp 65001 the default behavior

Re: How to display UTF-8 output to command shell in Win7?

2012-11-29 Thread Charles DeRykus
On Thu, Nov 29, 2012 at 5:00 AM, timothy adigun 2teezp...@gmail.com wrote: Hi, Please check my comments below: On Thu, Nov 29, 2012 at 8:55 AM, Charles DeRykus dery...@gmail.com wrote: On Wed, Nov 28, 2012 at 8:10 PM, boB Stepp robertvst...@gmail.com wrote: As I have mentioned

Re: How to display UTF-8 output to command shell in Win7?

2012-11-28 Thread Charles DeRykus
on? (I understand that the first line is a consequence of my system command to turn on UTF-8.) binmode STDOUT, :utf8; -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: hash help !

2012-11-15 Thread Charles DeRykus
sides keys and values. One possible way: DB_File has a BTREE file type (with the R_DUP setting and the 'seq' API method) that enables storing/retrieving dup's. There's a full example in the docs. See: perldoc DB_File. -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr

Re: hash help !

2012-11-14 Thread Charles DeRykus
Assuming no anomalies/surprises in file.txt: use File::Slurp; use strict; use warnings; my @lines = read_file( 'file.txt', chomp=1 ); my %hash = map { split( /\s*=\s*/,$_ ) } @lines; -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail

Re: Is CGI module has bug for Win7?

2012-10-26 Thread Charles DeRykus
line endings. See: perldoc perlio -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Wide character in print at D:/Perl/lib/WWW/Mechanize.pm line 2044

2012-10-23 Thread Charles DeRykus
looks correct. I have modified the Mechanize.pm @ line no. 2042 to open( my $fh, ':utf8', $filename ). But I am not getting the desired output. Please help in getting the $mech-content in utf-8 format. Try $mech-decoded_content instead of $mech-content. HTH, Charles DeRykus -- To unsubscribe

can't post to perl.beginners

2009-11-03 Thread Charles DeRykus
Hello, I subscribed to perl.beginners via Google groups but none of my posts get through Can you help or suggest what might be amiss? -- Charles DeRykus