[27899] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 9263 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jun 8 11:20:34 2006

Date: Thu, 8 Jun 2006 08:20:26 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 8 Jun 2006     Volume: 10 Number: 9263

Today's topics:
        manupulating string having two rows <hara.acharya@gmail.com>
    Re: manupulating string having two rows <bart@nijlen.com>
    Re: manupulating string having two rows <tuser3@gmail.com>
    Re: manupulating string having two rows <mumia.w.18.spam+nospam.usenet@earthlink.net>
    Re: manupulating string having two rows <glennj@ncf.ca>
    Re: manupulating string having two rows <mumia.w.18.spam+nospam.usenet@earthlink.net>
    Re: manupulating string having two rows <rvtol+news@isolution.nl>
    Re: manupulating string having two rows <someone@example.com>
    Re: manupulating string having two rows <mumia.w.18.spam+nospam.usenet@earthlink.net>
    Re: manupulating string having two rows <rvtol+news@isolution.nl>
    Re: manupulating string having two rows <glennj@ncf.ca>
    Re: manupulating string having two rows <benmorrow@tiscali.co.uk>
    Re: manupulating string having two rows <rvtol+news@isolution.nl>
    Re: manupulating string having two rows <nobull67@gmail.com>
    Re: manupulating string having two rows <someone@example.com>
    Re: manupulating string having two rows <ced@blv-sam-01.ca.boeing.com>
    Re: Need help with Apache::Session <mario.albornoz@gmail.com>
        new CPAN modules on Thu Jun  8 2006 (Randal Schwartz)
    Re: newbie - changing value of lexical from outside of  <null7@wp.pl>
    Re: newbie - changing value of lexical from outside of  <zen13097@zen.co.uk>
    Re: newbie - changing value of lexical from outside of  <bart@nijlen.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 7 Jun 2006 02:13:45 -0700
From: "king" <hara.acharya@gmail.com>
Subject: manupulating string having two rows
Message-Id: <1149671625.517422.19570@g10g2000cwb.googlegroups.com>

$output = NVPCI32 Get Address: base=0xF0300060
                                  [0xE0300060] -> 0x00807805
                                            ....
This whole thing is saved in a scalar variable say $output.
Now i want to check the last two bits/characters that is 05 in this
case, and if these last two characters
are not 10, then
put 78 of 0x00807805 in a another scalar variable.

My problem-

as $output is a scalar, and the string is arranged in a peculier
manner, i am facing a lot of difficulties.
can anybody suggest how to do this.



------------------------------

Date: 7 Jun 2006 04:00:40 -0700
From: "Bart Van der Donck" <bart@nijlen.com>
Subject: Re: manupulating string having two rows
Message-Id: <1149678039.998596.40780@i39g2000cwa.googlegroups.com>

king wrote:

> $output = NVPCI32 Get Address: base=0xF0300060
>                                   [0xE0300060] -> 0x00807805
>                                             ....
> This whole thing is saved in a scalar variable say $output.
> Now i want to check the last two bits/characters that is 05 in this
> case,

'05' are 2 bytes here (not bits).

> and if these last two characters are not 10, then
> put 78 of 0x00807805 in a another scalar variable.
> My problem-
> as $output is a scalar, and the string is arranged in a peculier
> manner, i am facing a lot of difficulties.
> can anybody suggest how to do this.

The following should do the trick:

  #!perl
  use strict; use warnings;
  my $output= 'NVPCI32 Get Address: base=0xF0300060
               [0xE0300060] -> 0x00807805';
  my $var = 'nothing here!';
  my $check = '10';
  $var = $1 if $output =~ /(.{2})\Q$check\E$/;
  print $var;

Hope this helps,

-- 
 Bart



------------------------------

Date: 7 Jun 2006 04:00:46 -0700
From: "tuser" <tuser3@gmail.com>
Subject: Re: manupulating string having two rows
Message-Id: <1149678046.176722.172860@f6g2000cwb.googlegroups.com>

king wrote:
> $output = NVPCI32 Get Address: base=0xF0300060
>                                   [0xE0300060] -> 0x00807805
>                                             ....
> This whole thing is saved in a scalar variable say $output.
> Now i want to check the last two bits/characters that is 05 in this
> case, and if these last two characters
> are not 10, then
> put 78 of 0x00807805 in a another scalar variable.
>
> My problem-
>
> as $output is a scalar, and the string is arranged in a peculier
> manner, i am facing a lot of difficulties.

You would need to describe more details about how the string is
arranged, but from what I can tell from your message so far:

use strict;
use warnings;

my $output = '[0xE0300060] -> 0x00807805';
my $other_scalar = '';
if ($output =~ /(..)$/ and $1 ne '10') { $other_scalar = '78' }
print "\$other_scalar = '$other_scalar'\n";



------------------------------

Date: Wed, 07 Jun 2006 11:23:12 GMT
From: "Mumia W." <mumia.w.18.spam+nospam.usenet@earthlink.net>
Subject: Re: manupulating string having two rows
Message-Id: <AGyhg.2723$lf4.2375@newsread1.news.pas.earthlink.net>

king wrote:
> $output = NVPCI32 Get Address: base=0xF0300060
>                                   [0xE0300060] -> 0x00807805
>                                             ....
> This whole thing is saved in a scalar variable say $output.
> Now i want to check the last two bits/characters that is 05 in this
> case, and if these last two characters
> are not 10, then
> put 78 of 0x00807805 in a another scalar variable.
> 
> My problem-
> 
> as $output is a scalar, and the string is arranged in a peculier
> manner, i am facing a lot of difficulties.
> can anybody suggest how to do this.
> 

Read "perldoc perlre."

As you probably know, you can use the m// operator to match regular
expressions. The /s option to m// allows you to match over several
lines, so you would use m/<whatever-regex>/s.

Then you have to figure out what goes into <whatever-regex>. A good idea
is to make <whatever-regex> capture the data you want so that you can 
test it and possibly output it.

if (m/<whatever-regex>/s) {
	if (<some-condition>) {
		print "<some-value>\n";
	}
}




------------------------------

Date: 7 Jun 2006 11:24:16 GMT
From: Glenn Jackman <glennj@ncf.ca>
Subject: Re: manupulating string having two rows
Message-Id: <slrne8ddr0.65l.glennj@smeagol.ncf.ca>

At 2006-06-07 05:13AM, king <hara.acharya@gmail.com> wrote:
>  $output = NVPCI32 Get Address: base=0xF0300060
>                                    [0xE0300060] -> 0x00807805
>                                              ....
>  This whole thing is saved in a scalar variable say $output.
>  Now i want to check the last two bits/characters that is 05 in this
>  case, and if these last two characters
>  are not 10, then
>  put 78 of 0x00807805 in a another scalar variable.

2 ways:
    $len = length $output;
    my $other;
    if (substr($output, $len-2) eq '05') {
        $other = substr($output, $len-4, 2);
    }

or
    $output =~ /(\d\d)(\d\d)$/ and $2 eq '05' and my $other = $1;

-- 
Glenn Jackman
Ulterior Designer


------------------------------

Date: Wed, 07 Jun 2006 11:51:51 GMT
From: "Mumia W." <mumia.w.18.spam+nospam.usenet@earthlink.net>
Subject: Re: manupulating string having two rows
Message-Id: <r5zhg.2655$lp.1664@newsread3.news.pas.earthlink.net>

Mumia W. wrote:
> king wrote:
>> $output = NVPCI32 Get Address: base=0xF0300060
>>                                   [0xE0300060] -> 0x00807805
>>                                             ....
>> [...]
> 
> [...] The /s option to m// allows you to match over several
> lines, so you would use m/<whatever-regex>/s.
> [...]

Silly me. The /s option is not needed here, but the general idea still 
works.


------------------------------

Date: Wed, 7 Jun 2006 13:48:18 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: manupulating string having two rows
Message-Id: <e66lje.n8.1@news.isolution.nl>

Glenn Jackman schreef:
> king:

>>  $output = NVPCI32 Get Address: base=0xF0300060
>>                                    [0xE0300060] -> 0x00807805
>>                                              ....
>>  This whole thing is saved in a scalar variable say $output.
>>  Now i want to check the last two bits/characters that is 05 in this
>>  case, and if these last two characters
>>  are not 10, then
>>  put 78 of 0x00807805 in a another scalar variable.
>
> 2 ways:
>     $len = length $output;
>     my $other;
>     if (substr($output, $len-2) eq '05') {
>         $other = substr($output, $len-4, 2);
>     }

You can use negative indexes:

     my $other ;
     $other = substr($output, -4, 2) if substr($output, -2) eq '05' ;


> or
>     $output =~ /(\d\d)(\d\d)$/ and $2 eq '05' and my $other = $1;

Don't put a declaration in a conditional zone.

    my $other ;
    $other = $1 if $output =~ /(\d\d)05$/ ;

-- 
Affijn, Ruud

"Gewoon is een tijger."




------------------------------

Date: Wed, 07 Jun 2006 12:40:37 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: manupulating string having two rows
Message-Id: <9Pzhg.21075$I61.13361@clgrps13>

Dr.Ruud wrote:
> Glenn Jackman schreef:
>> 
>>or
>>    $output =~ /(\d\d)(\d\d)$/ and $2 eq '05' and my $other = $1;
> 
> Don't put a declaration in a conditional zone.
> 
>     my $other ;
>     $other = $1 if $output =~ /(\d\d)05$/ ;

It is only a problem if you use statement modifiers (like your example.)

$output =~ /(\d\d)(\d\d)$/ and $2 eq '05' and my $other = $1;

Is perfectly valid and will do the right thing with the lexical declaration.


John
-- 
use Perl;
program
fulfillment


------------------------------

Date: Wed, 07 Jun 2006 13:43:33 GMT
From: "Mumia W." <mumia.w.18.spam+nospam.usenet@earthlink.net>
Subject: Re: manupulating string having two rows
Message-Id: <9KAhg.10117$921.6154@newsread4.news.pas.earthlink.net>

Glenn Jackman wrote:
> At 2006-06-07 05:13AM, king <hara.acharya@gmail.com> wrote:
>>  $output = NVPCI32 Get Address: base=0xF0300060
>>                                    [0xE0300060] -> 0x00807805
>>                                              ....
> [...]
>     $output =~ /(\d\d)(\d\d)$/ and $2 eq '05' and my $other = $1;
> 

But those are probably hex digits.



------------------------------

Date: Wed, 7 Jun 2006 15:37:14 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: manupulating string having two rows
Message-Id: <e66s2r.1h0.1@news.isolution.nl>

John W. Krahn schreef:

> It is only a problem if you use statement modifiers [...]
>
> $output =~ /(\d\d)(\d\d)$/ and $2 eq '05' and my $other = $1;
>
> Is perfectly valid and will do the right thing with the lexical
> declaration.


I don't think 'statement modifiers' (trailing
if/unless/while/until/for[each]) make the real difference. Aren't the
and-s there, actually statement modifiers too?

perl -MO=Deparse -e '
$output =~ /(\d\d)05$/ and my $other = $1
'
my $other = $1 if $output =~ /(\d\d)05$/ ;

"Don't put a declaration in a conditional zone." was not meant to say
something was invalid, but as strong advice: Only declare early or late
with a special reason.

-- 
Affijn, Ruud

"Gewoon is een tijger."




------------------------------

Date: 7 Jun 2006 14:21:00 GMT
From: Glenn Jackman <glennj@ncf.ca>
Subject: Re: manupulating string having two rows
Message-Id: <slrne8do6c.eum.glennj@smeagol.ncf.ca>

At 2006-06-07 07:48AM, Dr.Ruud <rvtol+news@isolution.nl> wrote:
>  Glenn Jackman schreef:
> >     $output =~ /(\d\d)(\d\d)$/ and $2 eq '05' and my $other = $1;
>  
>  Don't put a declaration in a conditional zone.
>  
>      my $other ;
>      $other = $1 if $output =~ /(\d\d)05$/ ;

Quite right.  Thanks.  

-- 
Glenn Jackman
Ulterior Designer


------------------------------

Date: Wed, 7 Jun 2006 16:02:57 +0100
From: Ben Morrow <benmorrow@tiscali.co.uk>
Subject: Re: manupulating string having two rows
Message-Id: <1e6jl3-76d.ln1@osiris.mauzo.dyndns.org>


Quoth "John W. Krahn" <krahnj@telus.net>:
> Dr.Ruud wrote:
> > Glenn Jackman schreef:
> >> 
> >>or
> >>    $output =~ /(\d\d)(\d\d)$/ and $2 eq '05' and my $other = $1;
> > 
> > Don't put a declaration in a conditional zone.
> > 
> >     my $other ;
> >     $other = $1 if $output =~ /(\d\d)05$/ ;
> 
> It is only a problem if you use statement modifiers (like your example.)
> 
> $output =~ /(\d\d)(\d\d)$/ and $2 eq '05' and my $other = $1;
> 
> Is perfectly valid and will do the right thing with the lexical declaration.

Could you explain a little further? I though perl converted statement
modifiers into flow-control ops anyway; and B::Concise supports this:

~% perl -MO=Concise -e'$y and my $x=1'
8  <@> leave[1 ref] vKP/REFC ->(end)
1     <0> enter ->2
2     <;> nextstate(main 1 -e:1) v ->3
-     <1> null vK/1 ->8
4        <|> and(other->5) vK/1 ->8
-           <1> ex-rv2sv sK/1 ->4
3              <$> gvsv(*y) s ->4
7           <2> sassign vKS/2 ->8
5              <$> const(IV 1) s ->6
6              <0> padsv[$x:1,2] sRM*/LVINTRO ->7
-e syntax OK
~% perl -MO=Concise -e'my $x=1 if $y'
8  <@> leave[1 ref] vKP/REFC ->(end)
1     <0> enter ->2
2     <;> nextstate(main 1 -e:1) v ->3
-     <1> null vK/1 ->8
4        <|> and(other->5) vK/1 ->8
-           <1> ex-rv2sv sK/1 ->4
3              <$> gvsv(*y) s ->4
7           <2> sassign vKS/2 ->8
5              <$> const(IV 1) s ->6
6              <0> padsv[$x:1,2] sRM*/LVINTRO ->7
-e syntax OK

In both cases the padsv/LVINTRO is on the RHS of an and...

Ben

-- 
  The cosmos, at best, is like a rubbish heap scattered at random.
                                                           Heraclitus
  benmorrow@tiscali.co.uk


------------------------------

Date: Wed, 7 Jun 2006 16:20:18 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: manupulating string having two rows
Message-Id: <e6734j.s0.1@news.isolution.nl>

Mumia W. schreef:
> Glenn Jackman:
>> king:

>>>  $output = NVPCI32 Get Address: base=0xF0300060
>>>                        [0xE0300060] -> 0x00807805
>>>                                              ....
>>
>>     $output =~ /(\d\d)(\d\d)$/ and $2 eq '05' and my $other = $1;
>
> But those are probably hex digits.

Sure they are.

  my $qrx2 = /( [[:xdigit:]]{2} )( [[:xdigit:]]{2} )$/x ;
  my $other ;
  $other = $1 if ($output =~ m/$qrx2/)
             and ($2 ne '10') ;

-- 
Affijn, Ruud

"Gewoon is een tijger."




------------------------------

Date: 7 Jun 2006 10:36:11 -0700
From: "Brian McCauley" <nobull67@gmail.com>
Subject: Re: manupulating string having two rows
Message-Id: <1149701771.605324.325640@y43g2000cwc.googlegroups.com>


Dr.Ruud wrote:

> > king:
>
> >>  $output = NVPCI32 Get Address: base=0xF0300060
> >>                                    [0xE0300060] -> 0x00807805
> >>                                              ....
> >>  This whole thing is saved in a scalar variable say $output.
> >>  Now i want to check the last two bits/characters that is 05 in this
> >>  case, and if these last two characters
> >>  are not 10, then put 78 of 0x00807805 in a another scalar variable.
> >
>     my $other;
>     $other = $1 if $output =~ /(\d\d)05$/ ;

I thought the OP wanted anthing but '10' not '05'

Also at a guess the OP's data is not decimal numbers (i.e. \d) but
upper case hex. We could restrict the regex to [0-9A-F] (a class which
doubtless has a name but I can't be bothered to look it up) but why
not:

    $other = $1 if $output =~ /(..)(?!10)..$/;

Or, if you are happy for $other to be undef (rather that preserved) on
failure to match.

    my ($other) = $output =~ /(..)(?!10)..$/;



------------------------------

Date: Wed, 07 Jun 2006 22:41:48 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: manupulating string having two rows
Message-Id: <MCIhg.25195$S61.16888@edtnps90>

Dr.Ruud wrote:
> John W. Krahn schreef:
> 
>>It is only a problem if you use statement modifiers [...]
>>
>>$output =~ /(\d\d)(\d\d)$/ and $2 eq '05' and my $other = $1;
>>
>>Is perfectly valid and will do the right thing with the lexical
>>declaration.
> 
> 
> I don't think 'statement modifiers' (trailing
> if/unless/while/until/for[each]) make the real difference. Aren't the
> and-s there, actually statement modifiers too?
> 
> perl -MO=Deparse -e '
> $output =~ /(\d\d)05$/ and my $other = $1
> '
> my $other = $1 if $output =~ /(\d\d)05$/ ;

$ perl -MO=Deparse,-p -e'$output =~ /(\d\d)05$/ and my $other = $1'
(($output =~ /(\d\d)05$/) and (my $other = $1));
-e syntax OK



John
-- 
use Perl;
program
fulfillment


------------------------------

Date: Thu, 8 Jun 2006 05:15:54 GMT
From: Charles DeRykus <ced@blv-sam-01.ca.boeing.com>
Subject: Re: manupulating string having two rows
Message-Id: <J0IzyH.AKs@news.boeing.com>

Dr.Ruud wrote:
> John W. Krahn schreef:
> 
>> It is only a problem if you use statement modifiers [...]
>>
>> $output =~ /(\d\d)(\d\d)$/ and $2 eq '05' and my $other = $1;
>>
>> Is perfectly valid and will do the right thing with the lexical
>> declaration.
> 
> 
> I don't think 'statement modifiers' (trailing
> if/unless/while/until/for[each]) make the real difference. Aren't the
> and-s there, actually statement modifiers too?
> 
> perl -MO=Deparse -e '
> $output =~ /(\d\d)05$/ and my $other = $1
> '
> my $other = $1 if $output =~ /(\d\d)05$/ ;

Not really.  Deparse appears to just create an equivalent expression by 
transforming a trailing `and` to a statement modifier. Another `and`
connective makes this clear:

  $ perl  -MO=Deparse -e '$output =~ /(\d\d)05$/ and my $other = $1 and
                           my $other2 = $1;'
  my $other2 = $1 if $output =~ /(\d\d)05$/ and my $other = $1;
  -e syntax OK

With Deparse's -p option, the transformation doesn't happen at all:

  $ perl  -MO=Deparse,-p -e '$output =~ /(\d\d)05$/ and my $other = $1'
  (($output =~ /(\d\d)05$/) and (my $other = $1));
  -e syntax OK


> 
> "Don't put a declaration in a conditional zone." was not meant to say
> something was invalid, but as strong advice: Only declare early or late
> with a special reason.

Agreed.

-- 
Charles DeRykus


------------------------------

Date: 7 Jun 2006 05:44:28 -0700
From: "goliathuy" <mario.albornoz@gmail.com>
Subject: Re: Need help with Apache::Session
Message-Id: <1149684268.669233.24240@f6g2000cwb.googlegroups.com>

Thanks for the response, i've found now
Apache::Session::Store::Informix, i hadn't see it before, and there was
the db structure needed and other things that helped.

Jim Gibson wrote:
> In article <1149603286.405442.97480@y43g2000cwc.googlegroups.com>,
> goliathuy <mario.albornoz@gmail.com> wrote:
>
> > Hi, i'm needing some guidance regarding Apache::Session::Informix, or
> > any kind of Apache::Session..
> > The issue is that i do not really know how it works and i would like if
> > any one can point me to some simple "how to", or give me some
> > directions.
> > Thanks in advance.
> >
>
> Do you need help understanding the documentation for this module? Is
> the documentation inadequate or lacking something important?
>
> perldoc Apache::Session
>
> or
>
> http://search.cpan.org/dist/Apache-Session/Session.pm
>
>  Posted Via Usenet.com Premium Usenet Newsgroup Services
> ----------------------------------------------------------
>     ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
> ----------------------------------------------------------
>                 http://www.usenet.com



------------------------------

Date: Thu, 8 Jun 2006 04:42:05 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Thu Jun  8 2006
Message-Id: <J0IyE5.C8u@zorch.sf-bay.org>

The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN).  You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.

Devel-XRay-0.91
http://search.cpan.org/~jbisbee/Devel-XRay-0.91/
See What a Perl Module Is Doing
----
JavaScript-XRay-0.96
http://search.cpan.org/~jbisbee/JavaScript-XRay-0.96/
See What JavaScript is Doing
----
Astro-satpass-0.006
http://search.cpan.org/~wyant/Astro-satpass-0.006/
----
Digest-MD5-File-0.05
http://search.cpan.org/~dmuey/Digest-MD5-File-0.05/
Perl extension for getting MD5 sums for files and urls.
----
Yahoo-Marketing-0.01
http://search.cpan.org/~jlavallee/Yahoo-Marketing-0.01/
an interface for Yahoo! Search Marketing's Web Services.
----
CSS-Squish-0.01
http://search.cpan.org/~tsibley/CSS-Squish-0.01/
Compact many CSS files into one big file
----
XML-Genx-0.21
http://search.cpan.org/~hdm/XML-Genx-0.21/
A simple, correct XML writer
----
Chart-Graph-3.2
http://search.cpan.org/~caidaperl/Chart-Graph-3.2/
Perl extension for a front-end to gnuplot, XRT, and Xmgrace.
----
Games-Cards-Bridge-Contract-0.01
http://search.cpan.org/~davidrw/Games-Cards-Bridge-Contract-0.01/
Bridge (card game) contract and scoring class
----
HTML-Template-Compiled-0.67
http://search.cpan.org/~tinita/HTML-Template-Compiled-0.67/
Template System Compiles HTML::Template files to Perl code
----
HTML-WikiConverter-0.54
http://search.cpan.org/~diberri/HTML-WikiConverter-0.54/
Convert HTML to wiki markup
----
HTML-WikiConverter-MediaWiki-0.52
http://search.cpan.org/~diberri/HTML-WikiConverter-MediaWiki-0.52/
Convert HTML to MediaWiki markup
----
GD-Tiler-0.11
http://search.cpan.org/~darnold/GD-Tiler-0.11/
package to aggregate images into a single tiled image via GD
----
Net-Rendezvous-Publish-Backend-Avahi-0.02
http://search.cpan.org/~jablko/Net-Rendezvous-Publish-Backend-Avahi-0.02/
publish zeroconf data with the Avahi library
----
HTML-WikiConverter-PhpWiki-0.51
http://search.cpan.org/~diberri/HTML-WikiConverter-PhpWiki-0.51/
Convert HTML to PhpWiki markup
----
HTML-WikiConverter-MoinMoin-0.52
http://search.cpan.org/~diberri/HTML-WikiConverter-MoinMoin-0.52/
Convert HTML to MoinMoin markup
----
Rose-DB-Object-0.73
http://search.cpan.org/~jsiracusa/Rose-DB-Object-0.73/
Extensible, high performance RDBMS-OO mapper.
----
Rose-DB-0.70
http://search.cpan.org/~jsiracusa/Rose-DB-0.70/
A DBI wrapper and abstraction layer.
----
Rose-DateTime-0.53
http://search.cpan.org/~jsiracusa/Rose-DateTime-0.53/
DateTime helper functions and objects.
----
Parse-Binary-0.10
http://search.cpan.org/~smueller/Parse-Binary-0.10/
Unpack binary data structures into object hierarchies
----
Net-Rendezvous-Publish-Backend-Avahi-0.01
http://search.cpan.org/~jablko/Net-Rendezvous-Publish-Backend-Avahi-0.01/
interface to the Avahi library
----
Win32-Exe-0.09
http://search.cpan.org/~smueller/Win32-Exe-0.09/
Manipulate Win32 executable files
----
PAR-Dist-0.10
http://search.cpan.org/~smueller/PAR-Dist-0.10/
Create and manipulate PAR distributions
----
PIX-Walker-1.02
http://search.cpan.org/~lifo/PIX-Walker-1.02/
Process Cisco PIX configs and 'walk' access-lists
----
Template-Latex-2.17
http://search.cpan.org/~andrewf/Template-Latex-2.17/
Latex support for the Template Toolkit
----
XML-TMX-0.14
http://search.cpan.org/~ambs/XML-TMX-0.14/
Perl extensions for managing TMX files
----
Params-Validate-0.85
http://search.cpan.org/~drolsky/Params-Validate-0.85/
Validate method/function parameters
----
Template-Filters-LazyLoader-0.01
http://search.cpan.org/~tomyhero/Template-Filters-LazyLoader-0.01/
Loading template filter modules by lazy way.
----
HTML-WikiConverter-Markdown-0.01
http://search.cpan.org/~diberri/HTML-WikiConverter-Markdown-0.01/
Convert HTML to Markdown markup
----
Task-StrawberryPerl-0.01
http://search.cpan.org/~adamk/Task-StrawberryPerl-0.01/
Specification for modules bundled with Strawberry Perl
----
Apache2-POST200-0.05
http://search.cpan.org/~opi/Apache2-POST200-0.05/
Converting code 200 responses to POST requests to 302
----
Catalyst-Model-File-0.02
http://search.cpan.org/~ash/Catalyst-Model-File-0.02/
File based storage model for Catalyst.
----
Class-DBI-AutoIncrement-0.04
http://search.cpan.org/~erwan/Class-DBI-AutoIncrement-0.04/
Emulate auto-incrementing columns on Class::DBI subclasses
----
Text-NASA_Ames-0.03
http://search.cpan.org/~heikok/Text-NASA_Ames-0.03/
Reading data from NASA Ames files
----
Test-Object-0.06
http://search.cpan.org/~adamk/Test-Object-0.06/
Thoroughly testing objects via registered handlers
----
Module-Pluggable-3.01
http://search.cpan.org/~simonw/Module-Pluggable-3.01/
automatically give your module the ability to have plugins
----
POE-Component-EasyDBI-1.14
http://search.cpan.org/~xantus/POE-Component-EasyDBI-1.14/
Perl extension for asynchronous non-blocking DBI calls in POE
----
Alien-SeleniumRC-0.12
http://search.cpan.org/~lukec/Alien-SeleniumRC-0.12/
Packages the Selenium Remote Control server.
----
WWW-Simpy-1.015
http://search.cpan.org/~beadsland/WWW-Simpy-1.015/
Perl interface to Simpy social bookmarking service
----
Bundle-Modules-2006.0606
http://search.cpan.org/~ermeyers/Bundle-Modules-2006.0606/
All current *stable* bundles of modules in CPAN


If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.

print "Just another Perl hacker," # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


------------------------------

Date: Wed, 07 Jun 2006 11:08:10 +0200
From: Pawel <null7@wp.pl>
Subject: Re: newbie - changing value of lexical from outside of module
Message-Id: <irnd2v0l.fsf@wp.pl>


Hallo all.

Thank You for all Yor responses. Now it is clear what is the right solution.

Greetings




------------------------------

Date: 07 Jun 2006 14:58:45 GMT
From: Dave Weaver <zen13097@zen.co.uk>
Subject: Re: newbie - changing value of lexical from outside of module
Message-Id: <4486e9a5$0$1224$db0fefd9@news.zen.co.uk>

On 6 Jun 2006 08:53:31 -0700, Bart Van der Donck <bart@nijlen.com> wrote:
>  Pawel wrote:
> 
> > #mymodule.pm:
> >
> > my $lex;
> > sub fun {
> > print $lex;
> > }
> >
> > I have another perl file that uses mymodule.pm
> >
> > main.pl:
> > use mymodule;
> > $lex=34;
> > fun(); # it does not print 34
> >
> > My question is - how can I make it ?
> 
>  Here are 2 possible ways:
--- <snip> ---

And here is a 3rd possible way:

  main.pl
 
    #!perl
    use strict; use warnings;
    use mymodule;

    mymodule::set_lex(34);
    mymodule::fun();
 
  mymodule.pm
 
    package mymodule;
    my $lex;
    sub set_lex {
	$lex = shift;
    }
    sub fun {
        print shift;
    }
    1;
 


------------------------------

Date: 7 Jun 2006 08:10:06 -0700
From: "Bart Van der Donck" <bart@nijlen.com>
Subject: Re: newbie - changing value of lexical from outside of module
Message-Id: <1149693006.526215.121540@f6g2000cwb.googlegroups.com>

Dave Weaver wrote:

> And here is a 3rd possible way:
>
>   main.pl
>
>     #!perl
>     use strict; use warnings;
>     use mymodule;
>
>     mymodule::set_lex(34);
>     mymodule::fun();
>
>   mymodule.pm
>
>     package mymodule;
>     my $lex;
>     sub set_lex {
> 	$lex = shift;
>     }
>     sub fun {
>         print shift;
>     }
>     1;

Four :)

main.pl

  #!perl
  use strict; use warnings; use mymodule;
  my $lex = 34; mymodule::fun for $lex;

mymodule.pm

  package mymodule; sub fun {print} 1

-- 
 Bart



------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 9263
***************************************


home help back first fref pref prev next nref lref last post