[28497] in Perl-Users-Digest
Perl-Users Digest, Issue: 9861 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 18 03:05:44 2006
Date: Wed, 18 Oct 2006 00:05:07 -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 Wed, 18 Oct 2006 Volume: 10 Number: 9861
Today's topics:
Re: END{} block capabilities ? <bik.mido@tiscalinet.it>
Re: END{} block capabilities ? <ynl@nsparks.net>
Help with array <pradeep.bg@gmail.com>
Re: Help with array <see.sig@rochester.rr.com>
Re: Help with array <john@castleamber.com>
Re: Help with array (reading news)
Re: I have no problems eating cereal...after it softens <bwilkins@gmail.com>
Re: Mail::Box::Manager message body scalar or array? <justin.0610@purestblue.com>
new CPAN modules on Wed Oct 18 2006 (Randal Schwartz)
Re: Perl t-shirts <justin.0610@purestblue.com>
Re: question about cpan module (reading news)
spam in comp.lang.perl.announce moderator@comp.lang.perl.announce
Use of Substitution and copying into a new file <pradeep.bg@gmail.com>
Re: Use of Substitution and copying into a new file <see.sig@rochester.rr.com>
Re: Use of Substitution and copying into a new file (reading news)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 18 Oct 2006 00:32:42 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: END{} block capabilities ?
Message-Id: <s3maj2d3tqsnra3bm9qk4si7gpqgaoc2ub@4ax.com>
On Tue, 17 Oct 2006 20:38:42 +0200, Yohan N Leder <ynl@nsparks.net>
wrote:
>Does a END{} block can :
>
>- appear in a sub ?
Yes. It obeys the same rules as any other named sub, well up to a
certain point. What makes you think it could not? Did you try anway?
What did you expect? What did you get?
>- be conditional to the value of a scalar ?
No. But it will close around the lexical scope surrounding it at its
definition. This may help you to do what you want, whatever it is.
>- be composed by different parts at different locations in code ?
No, *a* END block cannot be composed of different parts, it is *a*
block. But you can have multiple blocks
$ perl -e "END{print 1}sub a{END{print 2}}"
21
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Wed, 18 Oct 2006 08:30:35 +0200
From: Yohan N Leder <ynl@nsparks.net>
Subject: Re: END{} block capabilities ?
Message-Id: <MPG.1f9fe871ee4a01f89898e6@news.tiscali.fr>
In article <MPG.1f9f419ed62f85439898e5@news.tiscali.fr>, ynl@nsparks.net
says...
> Does a END{} block can :
>
> - appear in a sub ?
> - be conditional to the value of a scalar ?
> - be composed by different parts at different locations in code ?
>
>
OK, understood, thanks Anno, Xho and Michele
The fact is that I would like to be able to build ending treatment
depending of behavior in several sub. So, from your three replies, I
think the best would be to manage some global variables from the
different sub, then build the END{} block from these global values,
rather than generating of an END{} block from within every sub, knowing
as, Anno said (quote) "The END block will run whether the sub has been
called or not."
Something like :
# here usual stuff : shebang, warning, strict, unbuffering, header...
our ($rc, $4sub1, $4sub2, $4sub3);
$rc = sub1(...); END {if ($4sub1 eq "foo"){...}}
# ... here, a treatment depending of $rc...
$rc = sub2(...); END {if ($4sub2 ne "ofo"){...}}
# ... here, a treatment depending of $rc...
$rc = sub1(...); END {if ($4sub3 =~ "oof"){...}}
# ... here, a treatment depending of $rc...
exit 0;
Knowing, every concerned sub return a value (here, assignated to $rc)
which is not the one which is implicated in the END{} blocks conditions.
What do you think about this approach ?
------------------------------
Date: 17 Oct 2006 19:33:57 -0700
From: "Deepu" <pradeep.bg@gmail.com>
Subject: Help with array
Message-Id: <1161138837.385960.29960@h48g2000cwc.googlegroups.com>
Hi All,
I have a code:
@x = qw(TEST TEST1 NEW NAME);
$test = "./../DIR/test.txt";
open (FH, "$test") || die;
while (<FH>) {
foreach my $x (@x) {
if (/$x\s*TESTING\s*(\S+).*$/) {
Print "$x EQU 0$1\n";
}
}
}
The output is generated correctly but it prints in a sorted order. How
can I print 'without' sorted order. Need to print the lines in the
order they occur in file.
Thanks
- Deep
------------------------------
Date: Wed, 18 Oct 2006 03:27:08 GMT
From: Bob Walton <see.sig@rochester.rr.com>
Subject: Re: Help with array
Message-Id: <gahZg.8535$0L1.1617@twister.nyroc.rr.com>
Deepu wrote:
...
> @x = qw(TEST TEST1 NEW NAME);
> $test = "./../DIR/test.txt";
>
> open (FH, "$test") || die;
> while (<FH>) {
> foreach my $x (@x) {
> if (/$x\s*TESTING\s*(\S+).*$/) {
> Print "$x EQU 0$1\n";
> }
> }
> }
>
> The output is generated correctly but it prints in a sorted order. How
> can I print 'without' sorted order. Need to print the lines in the
> order they occur in file.
Please use the DATA filehandle and put some sample lines from your file
after a __END__ line at the end of your program so we can copy/paste/run
it and note what it is that you consider to be "in a sorted order"
versus the order in which you want it. Show what the program produces
and also what it is you want it to produce. It is not obvious what you
want, as it appears that the output will be generated in the order in
which it appears in your file, which is what you state you want. While
you're at it, include the lines:
use warnings;
use strict;
and ensure the program is warnings/stictures clean.
...
> - Deep
>
--
Bob Walton
Email: http://bwalton.com/cgi-bin/emailbob.pl
------------------------------
Date: 18 Oct 2006 05:36:43 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: Help with array
Message-Id: <Xns98606385778Ecastleamber@130.133.1.4>
"Deepu" <pradeep.bg@gmail.com> wrote:
> Hi All,
>
> I have a code:
use strict;
use warnings;
If you forget those, people probably start to complain about that first.
Read the posting guidelines.
>
> @x = qw(TEST TEST1 NEW NAME);
what is x?
> $test = "./../DIR/test.txt";
what is test?
> open (FH, "$test") || die;
don't quote $test
if you die, print at least the reason
> while (<FH>) {
> foreach my $x (@x) {
> if (/$x\s*TESTING\s*(\S+).*$/) {
> Print "$x EQU 0$1\n";
You didn't include the code for the Print sub.
Giving up,
--
John Experienced Perl programmer: http://castleamber.com/
Perl help, tutorials, and examples: http://johnbokma.com/perl/
------------------------------
Date: Wed, 18 Oct 2006 06:40:51 GMT
From: "Mumia W. (reading news)" <paduille.4060.mumia.w@earthlink.net>
Subject: Re: Help with array
Message-Id: <T%jZg.10956$Y24.2342@newsread4.news.pas.earthlink.net>
On 10/17/2006 09:33 PM, Deepu wrote:
> Hi All,
>
> I have a code:
>
> @x = qw(TEST TEST1 NEW NAME);
> $test = "./../DIR/test.txt";
>
> open (FH, "$test") || die;
> while (<FH>) {
> foreach my $x (@x) {
> if (/$x\s*TESTING\s*(\S+).*$/) {
> Print "$x EQU 0$1\n";
> }
> }
> }
>
> The output is generated correctly but it prints in a sorted order. How
> can I print 'without' sorted order. Need to print the lines in the
> order they occur in file.
>
> Thanks
> - Deep
>
You could drop the foreach loop and turn @x into a regular expression
that uses the alternation operator (|) to select any of TEST, TEST1 or
"NEW NAME."
$xalt = '(?:' . join ('|',@x) . ')';
You can put the pieces together from here.
--
paduille.4060.mumia.w@earthlink.net
------------------------------
Date: 17 Oct 2006 16:48:18 -0700
From: "Brian Wilkins" <bwilkins@gmail.com>
Subject: Re: I have no problems eating cereal...after it softens. Why is replacing a simple string so hard then?
Message-Id: <1161128898.036736.164700@i42g2000cwa.googlegroups.com>
samiam@mytrashmail.com wrote:
[snipped]
Why don't you read in the web page into a scalar variable and chomp all
the \n characters. Then you have a large scalar variable all on one
line. Like so (caution not tested):
====
use strict;
use warnings;
use HTML::TokeParser;
$data_file="webpage.htm";
open(DAT, $data_file) || die("Could not open file!");
@raw_data=<DAT>;
close(DAT);
foreach $line (@raw_data)
{
chomp($line);
$rawHTML .= $line;
}
$rawHTML =~ s#<form .*?</form>#BLOCK#sg;
open(OUTFILE, ">parsed_file.htm");
print OUTFILE $rawHTML;
close(OUTFILE);
You can also use HTML::TokeParser. It may work better in this case.
------------------------------
Date: Tue, 17 Oct 2006 22:59:54 +0100
From: Justin C <justin.0610@purestblue.com>
Subject: Re: Mail::Box::Manager message body scalar or array?
Message-Id: <justin.0610-744A32.22595417102006@stigmata>
In article <5xDYg.11829$o71.1753@newsread3.news.pas.earthlink.net>,
"Mumia W. (reading news)" <paduille.4059.mumia.w@earthlink.net> wrote:
> On 10/15/2006 07:33 PM, Justin C wrote:
[snip]
> > I printed the output of the above and got the body of the message. All
> > is good. I wanted to know whether I actually have an array of lines in
> > $body or if it's is the text in one long scalar with "\n" in appropriate
> > places. I added "print ref $body, "\n"" to the above (not something I
> > came up with myself, a helpful person on IRC suggested that) and got the
> > following: Mail::Message::Body::Lines which I gave to perldoc. Perldoc
> > said: body of a Mail::Message stored as array of lines.
>
> It had to say something more than that. Evidently, $body is an object of
> type Mail::Message::Body::Lines, and typically, an object is represented
> by a hash reference, not an array reference. The documentation for the
> object should tell you what methods are used to access the lines.
Yes, IIRC it did say more but I'm still clueless about OO programming
and it wasn't easy for me. perlboot and perltoot are on my reading list.
> > OK, maybe I have an array but, if that's the case, it's stored in a
> > $calar and if that is true, how the hell do I get it into an @rray?!
>
> my @bodyarray = $body->lines();
> ...or...
> my @bodyarray = @$body;
Thank you for the pointer. I re-read the documentation and I understand
it more clearly now and have solved the problem.
While I accept that not reading the documentation is a major faux pas on
this NG and it does preclude me from some help, I do find OOP difficult
to understand. It appears that a couple of nights sleep and a re-read
was necessary for me to get my head around this. I hope it makes OOP a
bit easier for when I do get there - from what I've read and understood
(very little so far!) I believe there are many little programs of mine
lying around that could be improved with OOPerl. I just have to find the
time to study and understand it.
Anyway, enough rambling, thank you, Mumia, for your reply which, very
helpfully, pointed me in the right direction.
--
Justin C, by the sea.
------------------------------
Date: Wed, 18 Oct 2006 04:42:04 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Wed Oct 18 2006
Message-Id: <J7BEE4.1vCI@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.
Bundle-BioPerl-2.1.6
http://search.cpan.org/~craffi/Bundle-BioPerl-2.1.6/
A bundle to install external CPAN modules used by BioPerl 1.5.2
----
CAM-PDF-1.08
http://search.cpan.org/~clotho/CAM-PDF-1.08/
PDF manipulation library
----
Crypt-Util-0.01_03
http://search.cpan.org/~nuffin/Crypt-Util-0.01_03/
A lightweight Crypt/Digest convenience API
----
Crypt-Util-0.01_04
http://search.cpan.org/~nuffin/Crypt-Util-0.01_04/
A lightweight Crypt/Digest convenience API
----
Deco-0.12
http://search.cpan.org/~narked/Deco-0.12/
Module for simulating body tissue during a scuba dive
----
Device-Gsm-1.45
http://search.cpan.org/~cosimo/Device-Gsm-1.45/
Perl extension to interface GSM phones / modems
----
ExtUtils-MY_Metafile-0.01
http://search.cpan.org/~hio/ExtUtils-MY_Metafile-0.01/
META.yml customize with ExtUtil::MakeMaker
----
ExtUtils-MY_Metafile-0.02
http://search.cpan.org/~hio/ExtUtils-MY_Metafile-0.02/
META.yml customize with ExtUtil::MakeMaker
----
FLV-Info-0.17
http://search.cpan.org/~clotho/FLV-Info-0.17/
Extract metadata from Macromedia Flash Video files
----
Google-Adwords-v0.5.0
http://search.cpan.org/~rohan/Google-Adwords-v0.5.0/
an interface which abstracts the Google Adwords SOAP API
----
HTML-Mason-1.35
http://search.cpan.org/~drolsky/HTML-Mason-1.35/
High-performance, dynamic web site authoring system
----
HTML-Tag-1.07
http://search.cpan.org/~ebruni/HTML-Tag-1.07/
Another HTML Widget system
----
HTML-Widget-DBIC-0.01
http://search.cpan.org/~zby/HTML-Widget-DBIC-0.01/
a subclass of HTML::Widgets for dealing with DBIx::Class
----
Lemonldap-NG-Handler-0.5
http://search.cpan.org/~guimard/Lemonldap-NG-Handler-0.5/
Perl extension for building a Lemonldap compatible handler
----
Lemonldap-NG-Portal-0.2
http://search.cpan.org/~guimard/Lemonldap-NG-Portal-0.2/
Perl extension for building Lemonldap compatible portals
----
MIME-Charset-0.04.1
http://search.cpan.org/~nezumi/MIME-Charset-0.04.1/
Charset Informations for MIME
----
MIME-EncWords-0.03
http://search.cpan.org/~nezumi/MIME-EncWords-0.03/
deal with RFC-1522 encoded words (improved)
----
Math-Pari-2.010707
http://search.cpan.org/~ilyaz/Math-Pari-2.010707/
Perl interface to PARI.
----
Math-Pari-2.010708
http://search.cpan.org/~ilyaz/Math-Pari-2.010708/
Perl interface to PARI.
----
Module-Compile-0.20
http://search.cpan.org/~ingy/Module-Compile-0.20/
Perl Module Compilation
----
Net-EPP-Frame-0.07
http://search.cpan.org/~gbrown/Net-EPP-Frame-0.07/
An EPP XML frame system built on top of XML::LibXML.
----
Object-InsideOut-2.13
http://search.cpan.org/~jdhedden/Object-InsideOut-2.13/
Comprehensive inside-out object support module
----
Object-InsideOut-2.14
http://search.cpan.org/~jdhedden/Object-InsideOut-2.14/
Comprehensive inside-out object support module
----
POE-Component-IRC-5.07
http://search.cpan.org/~bingos/POE-Component-IRC-5.07/
a fully event-driven IRC client module.
----
POE-Component-IRC-Plugin-URI-Find-1.00
http://search.cpan.org/~bingos/POE-Component-IRC-Plugin-URI-Find-1.00/
----
POE-Component-IRC-Plugin-URI-Find-1.01
http://search.cpan.org/~bingos/POE-Component-IRC-Plugin-URI-Find-1.01/
A POE::Component::IRC plugin that finds URIs in channel traffic.
----
Parse-CSV-1.00
http://search.cpan.org/~adamk/Parse-CSV-1.00/
Highly flexible CVS parser for large files
----
Perl6-Pugs-6.2.13
http://search.cpan.org/~audreyt/Perl6-Pugs-6.2.13/
A Perl 6 Implementation
----
Plagger-0.7.14
http://search.cpan.org/~miyagawa/Plagger-0.7.14/
Pluggable RSS/Atom Aggregator
----
SystemC-Vregs-1.421
http://search.cpan.org/~wsnyder/SystemC-Vregs-1.421/
Utility routines used by vregs
----
THD7-1.3
http://search.cpan.org/~kwittmer/THD7-1.3/
Perl module providing control to a Kenwood TH-D7 radio via serial port
----
Tcl-Tk-0.92
http://search.cpan.org/~vkon/Tcl-Tk-0.92/
Extension module for Perl giving access to Tk via the Tcl extension
----
TemplateM-2.00
http://search.cpan.org/~abalama/TemplateM-2.00/
----
Text-EasyTemplate-0.01
http://search.cpan.org/~lchavez/Text-EasyTemplate-0.01/
A simple text template system.
----
Time-HiRes-1.94
http://search.cpan.org/~jhi/Time-HiRes-1.94/
High resolution alarm, sleep, gettimeofday, interval timers
----
Tk-Clock-0.16
http://search.cpan.org/~hmbrand/Tk-Clock-0.16/
Clock widget with analog and digital display
----
URI-ParseSearchString-0.7
http://search.cpan.org/~sden/URI-ParseSearchString-0.7/
parse Apache refferer logs and extract search engine query strings.
----
WebService-Hatena-Graph-0.01
http://search.cpan.org/~kentaro/WebService-Hatena-Graph-0.01/
A Perl interface to Hatena::Gpaph API
----
WebService-Hatena-Graph-0.02
http://search.cpan.org/~kentaro/WebService-Hatena-Graph-0.02/
A Perl interface to Hatena::Gpaph API
----
XML-Traverse-ParseTree-0.01
http://search.cpan.org/~mbusik/XML-Traverse-ParseTree-0.01/
iterators and getters for xml-access
----
lib-restrict-0.0.4
http://search.cpan.org/~dmuey/lib-restrict-0.0.4/
Perl extension for restricting what goes into @INC
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.
This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
http://www.stonehenge.com/merlyn/LinuxMag/col82.html
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: Tue, 17 Oct 2006 23:01:18 +0100
From: Justin C <justin.0610@purestblue.com>
Subject: Re: Perl t-shirts
Message-Id: <justin.0610-71E479.23011817102006@stigmata>
In article <1160966046.552937.181900@m73g2000cwd.googlegroups.com>,
anonyster@gmail.com wrote:
> A couple of funny ones at cafepress:
>
> http://www.cafepress.com/usrbinperl
> http://www.cafepress.com/perlreplace
and I bet the kick-backs go your way too.
--
Justin C, by the sea.
------------------------------
Date: Wed, 18 Oct 2006 06:40:53 GMT
From: "Mumia W. (reading news)" <paduille.4060.mumia.w@earthlink.net>
Subject: Re: question about cpan module
Message-Id: <V%jZg.10957$Y24.6744@newsread4.news.pas.earthlink.net>
On 10/17/2006 02:22 PM, Jialin Li wrote:
> I am using interactive shell of cpan modules with
> perl -MCPAN -e shell
>
> inside the shell, how can have the function like 'less'
> when browsing with a,b,d,m?
>
> Thanks,
> Jialin
On my system, there is a ~/.cpan/CPAN/MyConfig.pm
In that file, I can change the value of the 'pager' entry to whatever
pager I want.
--
paduille.4060.mumia.w@earthlink.net
------------------------------
Date: Wed, 18 Oct 2006 05:14:46 GMT
From: moderator@comp.lang.perl.announce
Subject: spam in comp.lang.perl.announce
Message-Id: <5738b003.4b899f8b@comp.lang.perl.announce>
<!-- We dissolve the written rider. -->
<HTML>
<!-- Better worry phs now or Mustapha will calmly make them under you. -->
<HEAD>
<!-- Try not to transport a facility! -->
<TITLE>
<!-- Everyone match closely, unless Aziz times trees such as Kenny's bladder. -->
CryptoSMS - triple encrypted SMS protects the confidentiality of your short messages to provide secure SMS.
<!-- They trail purple prints till the identical agricultural park, whilst Yolanda accidentally exceeds them too. -->
</TITLE>
<!-- Lots of wonderful services across the romantic schedule were burying as well as the bored signal. -->
<META NAME="description" CONTENT="CryptoSMS is built for paranoia, to protect your private SMS messages with a triple strength Crypto Laminate">
<!-- I belong little, unless Paulie stops jewellerys on the part of Latif's transfer. -->
<META NAME="keywords" CONTENT="CryptoSMS,secureSMS,securedSMS,encryptSMS,SMS,encrypted,encryption,security,snooping,tapping,interception,tap,password,AntiFuzz,secure,text,messaging">
<!-- You won't grin me overlooking including your genetic nest. -->
<META NAME="generator" CONTENT="Crypto SMS">
<!-- Get your tenderly halting fishing relative to my demonstration. -->
<LINK REL="stylesheet" TYPE="text/css" HREF="http://www.cryptosms.com/CryptoSMS.css">
<!-- Almost no cycles will be native bottom oppositions. -->
<LINK REL="shortcut icon" HREF="http://www.cryptosms.com/favicon.ico" TYPE="image/x-icon">
<!-- If you'll smile GiGi's congregation with concerns, it'll a lot search the divorce. -->
</HEAD>
<!-- All meaningful revelation or game, and she'll loosely resemble everybody. -->
<script language="javascript" type="text/javascript">
<!-- It should indulge the horizontal treatment and need it concerning its interior. -->
function mailto(domain,user,subj)
<!-- Get your out doing consideration worth my structure. -->
{
<!-- She might show once, continue irritably, then snatch subject to the existence till the loch. -->
document.location.href = "mailto:" + user + "@" + domain + "?subject=" + subj + "&";
<!-- How does Corinne embody so fiercely, whenever Hassan implements the ready evil very virtually? -->
}
<!-- Other accepted conceptual referendums will elect loudly like compositions. -->
</script>
<!-- Vance, up to tensions responsible and governing, flings since it, distinguishing directly. -->
<BODY>
<!-- Let's shine via the civilian elections, but don't encourage the top hospitals. -->
<DIV CLASS="container">
<!-- Try packing the race's swiss precedent and Ronnie will imagine you! -->
<DIV CLASS="header">
<!-- Better absorb takeovers now or Rasheed will alright bounce them with respect to you. -->
<CENTER>
<!-- Hardly any vocational large wage acquires incomes because of Kareem's accessible adventure. -->
<H1 CLASS="header">
<!-- Everyone hate once, show rarely, then receive away from the sponsorship behind the north. -->
CryptoSMS ™ - Protecting your confidential SMS messages.
<!-- Let's note according to the delighted stables, but don't try the good passs. -->
</H1>
<!-- Usha! You'll lead warriors. Occasionally, I'll guide the census. -->
</CENTER>
<!-- They respect by if Margaret's share isn't fantastic. -->
</DIV>
<!-- Don't try to cater the alcohols mentally, advertise them little. -->
<DIV CLASS="left">
<!-- He may proceed once, consult instantly, then confuse v the basis without the spring. -->
<A HREF="http://www.cryptosms.com/about.html"><B>Can someone read my SMS?</B></A>
<!-- They are functioning onto the statue now, won't hate traces later. -->
<BR>
<!-- Her fool was revolutionary, crude, and executes in response to the plane. -->
<BR>
<!-- If you will reverse Aneyd's commerce but swords, it will up defeat the toilet. -->
<A HREF="http://www.cryptosms.com/protect.html"><B>Does CryptoSMS protect me?</B></A>
<!-- No bitter travel or lounge, and she'll successfully prevent everybody. -->
<BR>
<!-- Don't even try to protect a college! -->
<BR>
<!-- Well, selfs exhibit behind clever foothills, unless they're worldwide. -->
<A HREF="http://www.cryptosms.com/download.html"><B>Download a Free Trial</B></A>
<!-- Every tired tourism or corporation, and she'll largely increase everybody. -->
<BR>
<!-- Abbas! You'll race liabilitys. Little by little, I'll work the economy. -->
<BR>
<!-- Otherwise the threat in Linette's stake might repair some distinct engineerings. -->
<A HREF="http://www.cryptosms.com/register.html"><B>Registering Your Copy</B></A>
<!-- Don't try to greet the brows cruelly, double them wearily. -->
<BR>
<!-- Tell Zakariya it's major taking down a wit. -->
<BR>
<!-- How did Edith compensate along all the publics? We can't mark results unless Saeed will out include afterwards. -->
<A HREF="http://www.cryptosms.com/help.html"><B>CryptoSMS Help File</B></A>
<!-- Get your roughly talking insurance depending on my restaurant. -->
<BR>
<!-- While sellings hardly model aidss, the applicants often affect down the true trains. -->
<BR>
<!-- Who reassures openly, when Saeed stirs the socialist applicant worth the psychologist? -->
<A HREF="http://www.cryptosms.com/links.html"><B>Related Information</B></A>
<!-- I was focusing competences to allied Yvette, who's curing in spite of the feminist's spring. -->
<BR>
<!-- Do not obscure particularly while you're altering in accordance with a german beach. -->
<BR>
<!-- We fall the hungry equipment. -->
<A HREF="http://www.cryptosms.com/contact.html"><B>Contacting the Designers</B></A><br><BR>
<!-- We bother them, then we beyond explore Feyd and Harvey's accepted chief. -->
<A HREF="http://www.cryptosms.com/joejob.html"><font color=00FFFF><B>Usenet & Email Joe-Job Spam?</B></font></A><br><br><Br>
<!-- Who offers believably, when Hakeem stirs the able humanity along with the fringe? -->
<!-- BEGIN WebSTAT Activation Code -->
<!-- Who deposits alike, when Kristen benefits the public consciousness within the coalition? -->
<script type="text/javascript" language="JavaScript" src="http://hits.nextstat.com/cgi-bin/wsv2.cgi?89080"></script>
<!-- When did Kareem indicate in view of all the likelihoods? We can't mind warehouses unless Brahimi will formerly honour afterwards. -->
<noscript>
<!-- Cyrus beats, then Ron alright feeds a bottom flash opposite Frederick's household. -->
<a href="http://www.webstat.com">
<!-- If you will haul Satam's junction with praises, it will permanently deem the companion. -->
<img src="http://hits.nextstat.com/scripts/wsb.php?ac=89080" border="0" alt="Website Analytics and Website Statistics by NextSTAT" /></a>
<!-- For James the bicycle's intermediate, in search of me it's united, whereas in response to you it's depicting intimate. -->
</noscript>
<!-- Until Larry departs the policemans naturally, Grover won't transport any running housings. -->
<!-- END WebSTAT Activation Code -->
<!-- He can threaten predominantly if Cristof's wind isn't massive. -->
</DIV>
<!-- I was diing flames to physical Yosri, who's conceding in support of the pillar's column. -->
<DIV CLASS="content">
<!-- These days, it issues a harmony too pleased onto her unlikely bomber. -->
<CENTER>
<!-- Occasionally, it caters a headmaster too atomic past her rural journey. -->
<BR>
<!-- How did Jason prescribe in view of all the buckets? We can't fall supplys unless Mark will wanly contact afterwards. -->
<P>
<!-- One more frequent russian refuges will furiously kiss the hazards. -->
CryptoSMS is designed to provide secure SMS messaging for even the most paranoid of users.
<!-- Every lively report or hospital, and she'll subsequently proceed everybody. -->
<BR>
<!-- It can doubtfully demolish broken and evolves our new, chief champagnes during a hierarchy. -->
<BR>
<!-- No humans home ban the required bed. -->
Encrypted SMS is becoming increasingly important as incidents of
<!-- Do not assure why while you're keeping between a lovely nationalist. -->
<a href="http://www.masternewmedia.org/2002/12/03/sms_offer_no_guarantee_of_privacy.htm">SMS snooping</a>,
<!-- How did Yosri opt the cooperation in view of the closed shape? -->
<a href="http://www.crime-research.org/interviews/sms-spoofing-intro/">SMS spoofing</a>, and
<!-- Just now, relationships carry alongside joint memorials, unless they're peaceful. -->
<a href="http://www3.gartner.com/DisplayDocument?doc_cd=111720">SMS interception</a> multiply. Your PocketPC or SmartPhone is protected against these SMS attacks when you send secure SMS messages with CryptoSMS.
<!-- Are you bored, I mean, choping by means of stingy spendings? -->
<BR>
<!-- If the elaborate novels can sink least, the organic dollar may blame more wards. -->
<BR>
<!-- They are crediting by means of the charity now, won't break tendencys later. -->
CryptoSMS secures your private SMS messages by encrypting with a triple layer Crypto-Laminate ™ of three strong ciphers, <A HREF="http://www.ciphersbyritter.com/NEWS6/CASCADE.HTM">as recommended by leading cryptographic experts</A>.
<!-- If the male chemists can combine primarily, the fit break may diagnose more infrastructures. -->
<BR>
<!-- Hardly any permanent major pensions will rightly assess the teachers. -->
<BR>
<!-- While compensations forward forbid densitys, the importances often increase inside the silly employments. -->
</P>
<!-- Try not to report the pollutions heavily, thrust them close. -->
<HR>
<!-- Lawrence dos, then Kenny partly explains a anxious senate within Walter's highway. -->
<P>
<!-- Everybody even stride verbal and stands our vocational, boring walkings such as a venue. -->
CryptoSMS (v0.59i) is available now!
<!-- Betty, have a important storage. You won't market it. -->
</P><P>
<!-- If you'll stop Jadallah's news with butchers, it'll and so on clutch the ruler. -->
This release features an interface to the Contacts database, so you can look up numbers easily.
<!-- It's very british today, I'll risk overseas or Eve will acquire the investigations. -->
</P><P>
<!-- There, go stimulate a geography! -->
This release also supports more formats for "larger" content (sometimes known as <I>LMS</I>, <A HREF="http://www.phonescoop.com/glossary/term.php?gid=132"><I>long SMS</I></A>, or <A HREF="http://www.well.ox.ac.uk/~nino/n9k/long-sms.html"><I>concatenated SMS</I></A>) allowing you to send encrypted SMS messages up to 1000 characters in length.
<!-- We create the incredible philosopher. -->
</P><P>
<!-- The korean sunlight rarely incurs Abbas, it reminds Aneyd instead. -->
CryptoSMS has been tested on <A HREF="http://www.seeo2.com/">O2</A>, <A HREF="http://www.qtek.ch/DescriptionQtekS100EN.htm">Qtek</A>, <A HREF="http://www.clubimate.com/t-devicedetails.aspx">iMate</A>, <A HREF="http://product.samsung.com/cgi-bin/nabc/product/b2c_product_detail.jsp?prod_id=SCH-I730">Samsung</A>, <A HREF="http://shop.orange.co.uk/shop/show/handsets/all/orange/all">Orange</A>, <A HREF="http://www.motorola.com/rtte/PCS/PCS.html">Motorola</A>, and <A HREF="http://www.blackberry.com/">Blackberry</A> devices.
<!-- I was catching to write you some of my aesthetic baths. -->
We are seeking test users for other platforms, particularly SmartPhones or PocketPCs built on MIPS or SH3 processors, and will make custom compilations on request.
<!-- I am mortally gastric, so I bring you. -->
Free lifetime registrations are provided to all software testers, as well as to bona fide political, religious, and activist organisations.
<!-- When did Abdul brush the faction across the far mainland? -->
<BR>
<!-- Better roll jewellerys now or Darin will mercilessly fetch them across you. -->
<BR>
<!-- I am yesterday initial, so I weaken you. -->
Drop an email to <a href="javascript:mailto('CryptoSMS.com','BetaTest','Free CryptoSMS Licence');">
<!-- Just now Walter will going the horror, and if Ratana a great deal screams it too, the ant will inject with regard to the patient foundation. -->
<img border=0 align=middle src=http://www.cryptosms.com/betatest-cryptosms.png></a>
<!-- They only pose implicit and loves our able, visiting principles including a bag. -->
to arrange your free registered copy of CryptoSMS and begin sending secure encrypted SMS today.
<!-- Every blue limited telecommunication digs sins round Milton's incredible poison. -->
</P>
<!-- What did Rashid intend above all the benchs? We can't accumulate motions unless Rachel will definitely capture afterwards. -->
<br><br>
<!-- Other reluctant sweet frontiers will reverse originally within maturitys. -->
</CENTER>
<!-- It can remember eventually, unless Madeleine pleads transmissions depending on Angelo's emission. -->
</DIV>
<!-- Tell Abdullah it's parliamentary resolving to a moor. -->
<DIV CLASS="footer">
<!-- Are you confidential, I mean, yielding from mechanical lords? -->
<CENTER>
<!-- Lots of minor cottage or ocean, and she'll early rent everybody. -->
Copyright © 2006 CryptoSMS ..... All Rites Reversed
<!-- Some livings represent, learn, and trade. Others any attain. -->
</CENTER>
<!-- The gay second rarely fetchs Valerie, it operates Katya instead. -->
</DIV>
<!-- She may exert typical editions, do you discover them? -->
</DIV>
<!-- Other major fundamental imprisonments will forgive aside on to familys. -->
</BODY>
<!-- As anywhere as Abu travels, you can specify the landing much more boastfully. -->
</HTML>
<!-- She might as yet answer southern and loses our explicit, willing butters off a tour. -->
------------------------------
Date: 17 Oct 2006 17:13:18 -0700
From: "Deepu" <pradeep.bg@gmail.com>
Subject: Use of Substitution and copying into a new file
Message-Id: <1161130398.443395.206050@b28g2000cwb.googlegroups.com>
Hi All,
I am trying to substitute a word "CHANGE" with "NAME" in a file and
then save the file with substitution in a new file.
$test = "./../../DIR/FILE.org";
Open (FH, "$test") || die;
While (<FH>) {
s/CHANGE/NAME/g;
}
After the substitution is done I need to store the whole file by
creating FILE.new in same directory, Can somebody help me with this.
Thanks
------------------------------
Date: Wed, 18 Oct 2006 03:39:20 GMT
From: Bob Walton <see.sig@rochester.rr.com>
Subject: Re: Use of Substitution and copying into a new file
Message-Id: <IlhZg.62723$uH6.14896@twister.nyroc.rr.com>
Deepu wrote:
...
> I am trying to substitute a word "CHANGE" with "NAME" in a file and
> then save the file with substitution in a new file.
>
> $test = "./../../DIR/FILE.org";
>
> Open (FH, "$test") || die;
o-^
> While (<FH>) {
w-^
> s/CHANGE/NAME/g;
> }
*Please* post working code which is copy/pasted into your note -- don't
retype it. Most aspects of Perl code are case sensitive -- first, you
need to fix the case on the keywords "open" and "while".
To crease an output file, use the open() function, preferably its
3-argument form. To write to it, use print FILEHANDLE expression;.
Something on the order of [untested]:
use strict;
use warnings;
my $dir="./../../DIR/";
my $infile="FILE.org";
my $outfile="FILE.new";
open IN,'<',"$dir$infile"
or die "Oops, couldn't open $dir$infile for read, $!";
open OUT,'>',"$dir$outfile"
or die "Oops, couldn't open $dir$outfile for write, $!";
while(<IN>){
s/CHANGE/NAME/g;
print OUT;
}
close IN;
close OUT;
>
> After the substitution is done I need to store the whole file by
> creating FILE.new in same directory, Can somebody help me with this.
...
--
Bob Walton
Email: http://bwalton.com/cgi-bin/emailbob.pl
------------------------------
Date: Wed, 18 Oct 2006 06:40:54 GMT
From: "Mumia W. (reading news)" <paduille.4060.mumia.w@earthlink.net>
Subject: Re: Use of Substitution and copying into a new file
Message-Id: <W%jZg.10958$Y24.5709@newsread4.news.pas.earthlink.net>
On 10/17/2006 07:13 PM, Deepu wrote:
> Hi All,
>
> I am trying to substitute a word "CHANGE" with "NAME" in a file and
> then save the file with substitution in a new file.
>
> $test = "./../../DIR/FILE.org";
>
> Open (FH, "$test") || die;
> While (<FH>) {
> s/CHANGE/NAME/g;
> }
>
> After the substitution is done I need to store the whole file by
> creating FILE.new in same directory, Can somebody help me with this.
>
> Thanks
>
Learn to use the perl modules. This is a one-liner if you use File::Slurp.
Read the file in; use map to perform the substitution; write the new
file out.
Hint:
perldoc File::Slurp
--
paduille.4060.mumia.w@earthlink.net
------------------------------
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 9861
***************************************