[28909] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 153 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Feb 20 03:09:56 2007

Date: Tue, 20 Feb 2007 00:09:06 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 20 Feb 2007     Volume: 11 Number: 153

Today's topics:
    Re: behavior of my print function call <someone@example.com>
    Re: fcntl call to check if a file is open -  help neede <someone@example.com>
        http://bangalore.pm.org abhishek.netjain@gmail.com
        new CPAN modules on Tue Feb 20 2007 (Randal Schwartz)
        Newbie...Not able to include a file in perl script <pankaj_wolfhunter@yahoo.co.in>
    Re: Newbie...Not able to include a file in perl script <see.sig@rochester.rr.com>
    Re: Newbie...Not able to include a file in perl script <josef.moellers@fujitsu-siemens.com>
    Re: Regex confusion <someone@example.com>
    Re: Regex confusion <tadmc@augustmail.com>
    Re: Regex: Why is overreaching necessary? <Shannon.Jacobs.nospam@gmail.com>
        Running Perl/CGI scripts in Tomcat server <nitte.sudhir@gmail.com>
    Re: Running Perl/CGI scripts in Tomcat server <spamtrap@dot-app.org>
    Re: Running Perl/CGI scripts in Tomcat server <nitte.sudhir@gmail.com>
    Re: which is more powerfull ? <tdavis@gearbox.maem.umr.edu>
    Re: which is more powerfull ? <spamtrap@dot-app.org>
    Re: which is more powerfull ? <spamhater123+U070219223241@grymoire.com>
    Re: which is more powerfull ? (Patrick TJ McPhee)
    Re: Win32: Need the intact ARGV string <rss@idiom.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 19 Feb 2007 22:42:37 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: behavior of my print function call
Message-Id: <xJpCh.95929$Fd.63506@edtnps90>

Joe Smith wrote:
> Dave Slayton wrote:
> 
>> Well, I see that the documentation states the curly braces must be
>> there. It doesn't begin to explain why.
> 
> You're right.  Somewhere else it's documented as needing a simple scalar.
> 
>> Also, some of the other things it offers don't seem to work as it
>> suggests, e.g.:
>> "(NOTE: If FILEHANDLE is a variable and the next token is a term, it
>> may be misinterpreted as an operator unless you interpose a "+" or put
>> parentheses around the arguments.)"
>>
>> As I said, parentheses around $file make it think I'm invoking a
>> subroutine,
> 
> The "it may be misinterpreted" refers to the things that are after the
> filehandle, not the filehandle itself.
> 
> 
> Misinterpreted:
> 
>     print ($a+$b)/$c;        <==>   (print($a+$b)) / $c;
> 
>     print $fh ($a+$b)/$c;    <==>   (print $fh ($a+$b)) / $c;

Incorrect:

$ perl -MO=Deparse,-p -e'print $fh ($a+$b)/$c;'
print($fh (($a + $b) / $c));
-e syntax OK



John
-- 
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order.       -- Larry Wall


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

Date: Mon, 19 Feb 2007 23:06:06 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: fcntl call to check if a file is open -  help needed
Message-Id: <y3qCh.95935$Fd.70326@edtnps90>

sa wrote:
> 
> Subject: fcntl call to check if a file is open -  help needed

perldoc -f fileno
   fileno FILEHANDLE
           Returns the file descriptor for a filehandle, or undefined if the
           filehandle is not open.


John
-- 
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order.       -- Larry Wall


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

Date: 19 Feb 2007 23:34:48 -0800
From: abhishek.netjain@gmail.com
Subject: http://bangalore.pm.org
Message-Id: <1171956888.552610.132220@s48g2000cws.googlegroups.com>

Hi,
There is still a bangalore perl mongers group, you all are requested
to at least join the mailing list and support the perl development in
bangalore.
The URL is http://bangalore.pm.org
Thanks,
Abhishek jain
http://bangalore.pm.org



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

Date: Tue, 20 Feb 2007 05:42:11 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Tue Feb 20 2007
Message-Id: <JDqyIB.BGx@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.

Apache2-Ajax-0.1
http://search.cpan.org/~rkobes/Apache2-Ajax-0.1/
mod_perl interface to CGI::Ajax
----
Apache2-Autocomplete-0.1
http://search.cpan.org/~rkobes/Apache2-Autocomplete-0.1/
Autocomplete service backend via mod_perl
----
Bundle-POE-IRC-1.01
http://search.cpan.org/~bingos/Bundle-POE-IRC-1.01/
Bundle to install all POE related IRC modules.
----
CGI-Apache2-Wrapper-0.1
http://search.cpan.org/~rkobes/CGI-Apache2-Wrapper-0.1/
provide param() and header() via mod_perl
----
CPAN-1.88_76
http://search.cpan.org/~andk/CPAN-1.88_76/
query, download and build perl modules from CPAN sites
----
CPAN-1.88_77
http://search.cpan.org/~andk/CPAN-1.88_77/
query, download and build perl modules from CPAN sites
----
CPANPLUS-0.77_04
http://search.cpan.org/~kane/CPANPLUS-0.77_04/
API & CLI access to the CPAN mirrors
----
Catalyst-Component-ACCEPT_CONTEXT-0.01
http://search.cpan.org/~jrockway/Catalyst-Component-ACCEPT_CONTEXT-0.01/
Make the current Catalyst request context available in Models and Views.
----
Catalyst-Component-ACCEPT_CONTEXT-0.02
http://search.cpan.org/~jrockway/Catalyst-Component-ACCEPT_CONTEXT-0.02/
Make the current Catalyst request context available in Models and Views.
----
Dispatch-Declare-v0.0.5
http://search.cpan.org/~rlb/Dispatch-Declare-v0.0.5/
Build a hash based dispatch table declaratively
----
Egg-Release-1.02
http://search.cpan.org/~lushe/Egg-Release-1.02/
WEB application framework release version.
----
Egg-Release-1.03
http://search.cpan.org/~lushe/Egg-Release-1.03/
WEB application framework release version.
----
Graph-Easy-0.53
http://search.cpan.org/~tels/Graph-Easy-0.53/
Render graphs as ASCII, HTML, SVG or via Graphviz
----
Graph-Easy-Manual-0.37
http://search.cpan.org/~tels/Graph-Easy-Manual-0.37/
HTML manual for Graph::Easy
----
IPC-PubSub-0.23
http://search.cpan.org/~audreyt/IPC-PubSub-0.23/
Interprocess Publish/Subscribe channels
----
Lucene-0.09
http://search.cpan.org/~tbusch/Lucene-0.09/
API to the C++ port of the Lucene search engine
----
Mail-Audit-2.215
http://search.cpan.org/~rjbs/Mail-Audit-2.215/
Library for creating easy mail filters
----
POE-Component-Client-Ident-1.05
http://search.cpan.org/~bingos/POE-Component-Client-Ident-1.05/
A component that provides non-blocking ident lookups to your sessions.
----
POE-Component-Client-NNTP-2.02
http://search.cpan.org/~bingos/POE-Component-Client-NNTP-2.02/
A component that provides access to NNTP.
----
POE-Component-Client-Pastebot-0.02
http://search.cpan.org/~bingos/POE-Component-Client-Pastebot-0.02/
interact with Bot::Pastebot web services.
----
POE-Component-Client-SOCKS-0.03
http://search.cpan.org/~bingos/POE-Component-Client-SOCKS-0.03/
SOCKS enable any POE Component
----
POE-Component-Client-Whois-1.09
http://search.cpan.org/~bingos/POE-Component-Client-Whois-1.09/
A one shot non-blocking RFC 812 WHOIS query.
----
POE-Component-Proxy-SOCKS-0.03
http://search.cpan.org/~bingos/POE-Component-Proxy-SOCKS-0.03/
A POE based SOCKS 4 proxy server.
----
POE-Component-Server-Ident-1.08
http://search.cpan.org/~bingos/POE-Component-Server-Ident-1.08/
A component that provides non-blocking ident services to your sessions.
----
POE-Component-Server-NNTP-0.97
http://search.cpan.org/~bingos/POE-Component-Server-NNTP-0.97/
A component that provides NNTP server functionality.
----
POE-Component-WWW-Shorten-1.06
http://search.cpan.org/~bingos/POE-Component-WWW-Shorten-1.06/
A non-blocking wrapper around WWW::Shorten.
----
POE-Filter-Zlib-1.90
http://search.cpan.org/~bingos/POE-Filter-Zlib-1.90/
A POE filter wrapped around Compress::Zlib
----
Package-Tent-v0.0.1
http://search.cpan.org/~ewilhelm/Package-Tent-v0.0.1/
temporary package infrastructure
----
Parse-IRC-1.02
http://search.cpan.org/~bingos/Parse-IRC-1.02/
A parser for the IRC protocol.
----
RDF-Core-0.51
http://search.cpan.org/~dpokorny/RDF-Core-0.51/
An object oriented Perl modules for handling tasks related to RDF.
----
Term-TtyRec-Plus-0.05
http://search.cpan.org/~sartak/Term-TtyRec-Plus-0.05/
read a ttyrec
----
Tk-Wizard-Bases-1.951
http://search.cpan.org/~mthurn/Tk-Wizard-Bases-1.951/
----
autorequire-0.06
http://search.cpan.org/~patl/autorequire-0.06/
Generate module code on demand
----
namespace-clean-0.02
http://search.cpan.org/~phaylon/namespace-clean-0.02/
Keep imports out of your namespace


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: 19 Feb 2007 19:43:20 -0800
From: "pankaj_wolfhunter@yahoo.co.in" <pankaj_wolfhunter@yahoo.co.in>
Subject: Newbie...Not able to include a file in perl script
Message-Id: <1171942999.905093.125130@v45g2000cwv.googlegroups.com>

Greetings,
                   I am entirely new to perl. Just starting with it.
I have a file (test.env) which I want to make use in (code.plx) file.
test.env contains variables which will be used in code.plx.

I tried:
#!/usr/bin/perl

$class='/full_path/test.env';

require $class;

But I am getting some "Bareword" found kinda error.

Can anyone correct me here?

TIA



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

Date: Mon, 19 Feb 2007 23:38:22 -0500
From: Bob Walton <see.sig@rochester.rr.com>
Subject: Re: Newbie...Not able to include a file in perl script
Message-Id: <45da7b3e$0$28085$4c368faf@roadrunner.com>

pankaj_wolfhunter@yahoo.co.in wrote:
> Greetings,
>                    I am entirely new to perl. Just starting with it.
> I have a file (test.env) which I want to make use in (code.plx) file.
> test.env contains variables which will be used in code.plx.
> 
> I tried:
> #!/usr/bin/perl
> 
> $class='/full_path/test.env';
> 
> require $class;
> 
> But I am getting some "Bareword" found kinda error.

Please give us the *exact* (copy/pasted, not re-typed) error message. 
That would help tremendously in figuring out what is wrong.

> 
> Can anyone correct me here?

Just a guess, since I'm not privy to the contents of test.env:  does 
test.env contain Perl code?  require() requires that it does.  If you 
would show the first and last 5 lines or so of test.env, it should be 
obvious.
 ...
-- 
Bob Walton
Email: http://bwalton.com/cgi-bin/emailbob.pl


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

Date: Tue, 20 Feb 2007 08:53:43 +0100
From: Josef Moellers <josef.moellers@fujitsu-siemens.com>
Subject: Re: Newbie...Not able to include a file in perl script
Message-Id: <ere9hj$7gj$1@nntp.fujitsu-siemens.com>

pankaj_wolfhunter@yahoo.co.in wrote:
> Greetings,
>                    I am entirely new to perl. Just starting with it.
> I have a file (test.env) which I want to make use in (code.plx) file.
> test.env contains variables which will be used in code.plx.
>=20
> I tried:
> #!/usr/bin/perl
>=20
> $class=3D'/full_path/test.env';
>=20
> require $class;
>=20
> But I am getting some "Bareword" found kinda error.
>=20
> Can anyone correct me here?

First of all "getiing some "Bareword" found kinda error" is some=20
unusable kinda description of a problem.

The "requires" directive requires the file to be a valid Perl script. If =

it's a collection of shell-like environment settings, e.g.
debug=3Dtrue
temp=3D/var/tmp
then, obviously, it won't work.

You have a couple of options:
1. convert this into a valid Perl script, e.g.
    $ENV{debug} =3D 'true';
    $ENV{temp} =3D '/var/tmp';
2. write a short function which reads and parses the file, or find a=20
suitable module which does that for you.

Josef
--=20
Josef M=F6llers (Pinguinpfleger bei FSC)
	If failure had no penalty success would not be a prize
						-- T.  Pratchett



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

Date: Mon, 19 Feb 2007 22:57:21 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: Regex confusion
Message-Id: <lXpCh.111818$Oa.68488@edtnps82>

trashman.horlicks@btinternet.com wrote:
> 
> By the way, looking at some examples of regex, I see constructs like
> this:
> [_\W]{0,3}
> Isn't this just the same as [\w\W]{0,3} ?

No.  [_\W] says match an underscore or a non-word character.  You could do the
same thing with the POSIX character class [^[:alnum:]].

[\w\W] matches *any* character, as would [\s\S] or [\d\D] or (?s:.).




John
-- 
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order.       -- Larry Wall


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

Date: Mon, 19 Feb 2007 19:05:40 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Regex confusion
Message-Id: <slrnetkib4.833.tadmc@tadmc30.august.net>

trashman.horlicks@btinternet.com <trashman.horlicks@btinternet.com> wrote:

> I'm just starting to use regex to do some pattern matching


You need *two* pieces of information to analyse why a pattern is
matching or not.

You need the regular expression, and you need the string that the
regular expression is to be matched against.


> regex  /\bTest\s*,/i


There is the regular expression.


> I can't see anything wrong. 


Neither can we, because we cannot see what is in $_


> Can anyone suggest whats amiss?


Probably the string does not match the pattern somehow.  (heh)


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: 19 Feb 2007 15:33:27 -0800
From: "Shannon Jacobs" <Shannon.Jacobs.nospam@gmail.com>
Subject: Re: Regex: Why is overreaching necessary?
Message-Id: <1171928007.342955.293760@v45g2000cwv.googlegroups.com>

On Feb 20, 3:07 am, anno4...@radom.zrz.tu-berlin.de wrote:
> Shannon Jacobs <Shannon.Jacobs.nos...@gmail.com> wrote in comp.lang.perl.misc:
>
> > On Feb 17, 10:58 am, anno4...@radom.zrz.tu-berlin.de wrote:
> > > Shannon Jacobs <sha...@cashette.com> wrote in comp.lang.perl.misc:
>
> [...]
>
> > > > I currently have .* in my first version above) so that it only considers 4
> > > > digits at a time. Here is some sample data from the file.
>
> > > > The Brethren                            20010210282239        Fa
> > > > Gorilla, My Love                        19810211042240        HF
> > > > KeitaiDenwaNoHimitsu                    200102110722412242    JaChCS
> > > > Harry Potter and the Philosopher's Stone199702111722362243    Fa
>
> > > > In this example the first and fourth lines are proper matches against 2239
> > > > and 2243, respectively, but the third line is an undesired match against
> > > > 1224. The problem as I see it is that the two things I'm thinking about
> > > > inserting should communicate with each other so that they always consume a
> > > > total of 8 characters, thereby forcing the target to consider only four
> > > > characters at a time.
>
> > > Try this variant:
>
> > >     @foo2 = grep substr( $_, 50, 12 ) =~
> > >         /^(?:\d{4}){0,2}$form_values{'a_SEARCH_VALUE'}/,
> > >         @foo1;
>
> > > Essentially that ties the pattern to the beginning of the substring,
> > > then allows zero to two groups of four digits before a match.
>
> > > Anno
>
> > Sorry, but that doesn't work. I think it's because it picks up the
> > false matches when it has no groups of four digits before the match.
>
> It doesn't pick up false matches from the sample you supplied.
>
> > Somehow it needs to be limited to considering only four source digits
> > at a time, or to think that there is a non-digit boundary between the
> > two groups of four digits.
>
> > (I don't think it matters, and I tested it both ways, but I think it
> > should be
>
> >     @foo2 = grep substr( $_, 50, 12 ) =~
> >         /^(?:.{4}){0,2}$form_values{'a_SEARCH_VALUE'}/,
> >         @foo1;
>
> > rather than your version. The data file may have spaces,
>
> Then your sample data should have included such a case.
>
> > and I think
> > that \d wouldn't count them at that point.)
>
> You are more permissive than the data requires.  If you want to allow
> blanks, allow blanks:
>
>     /^(?:[\d ]{4}){0,2}$form_values{'a_SEARCH_VALUE'}/
>
> Anno

You are correct, but the problem is apparently in the particular data
sample which I provided. When tested against the full data file it
still has the problem of the false matches. I was in a hurry to
acknowledge my error, but I don't have time this morning to do more
diagnostics.

Perhaps it is something about the presence of the third number in some
of the real data that is causing it to fail? I see that the sample I
included did not have any cases with 12 digits, but only 8.

(I did test Ilya Zakharevich's proposed suggestion in the next post,
and it worked more poorly, producing additional false matches. I'm
eager to study the differences there, though his approach seems more
complicated than yours.)



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

Date: 19 Feb 2007 19:29:02 -0800
From: "kath" <nitte.sudhir@gmail.com>
Subject: Running Perl/CGI scripts in Tomcat server
Message-Id: <1171942142.704893.204440@q2g2000cwa.googlegroups.com>

Hi,


I have problem running my cgi scripts under Apache Tomcat server. I am
using Apache Tomcat/5.5.20 on WinXP. I followed the instruction tips I
found out at

http://www.wellho.net/forum/Perl-Programming/Running-Perl-CGI-scripts-under-Apache-Tomcat.html

http://www.ftponline.com/javapro/2003_03/online/perl_teden_03_18_03/page2.aspx

but still I could not get the scripts running.

I get HTTP status 404 error.

The directory structure I have is (Please ignore the line break)
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps
                              \examples                            #
this is folder I created it
                              \WEB-INF                            #
this is folder I created it
                               \cgi
# this is folder I created it
                                    ------> script1.cgi
                                    ------> script2.cgi

The script runs perfectly on Apache HTTPD server. Can any one tell me
clearly what needs to be done to get my script running.


Thank you,
Regards,
kath



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

Date: Mon, 19 Feb 2007 22:49:03 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Running Perl/CGI scripts in Tomcat server
Message-Id: <m2wt2dzdxs.fsf@local.wv-www.com>

"kath" <nitte.sudhir@gmail.com> writes:

> I get HTTP status 404 error.

404 means "not found". It's got nothing at all to do with how your script
is written, or even in what language. So, since this is off-topic here, I'll
be brief in answering.

Check your server's error log - that will show where the server is looking
for your script. Obviously that won't match where the script really is - if
it did, you wouldn't be getting the 404. What you'll need to do is either
move your script to where the server is looking for it, or reconfigure the
server to look somewhere else.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


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

Date: 19 Feb 2007 23:28:16 -0800
From: "kath" <nitte.sudhir@gmail.com>
Subject: Re: Running Perl/CGI scripts in Tomcat server
Message-Id: <1171956496.081579.103460@v33g2000cwv.googlegroups.com>

On Feb 20, 8:29 am, "kath" <nitte.sud...@gmail.com> wrote:
> Hi,
>
> I have problem running my cgi scripts under Apache Tomcat server. I am
> using Apache Tomcat/5.5.20 on WinXP. I followed the instruction tips I
> found out at
>
> http://www.wellho.net/forum/Perl-Programming/Running-Perl-CGI-scripts...
>
> http://www.ftponline.com/javapro/2003_03/online/perl_teden_03_18_03/p...
>
> but still I could not get the scripts running.
>
> I get HTTP status 404 error.
>
> The directory structure I have is (Please ignore the line break)
> C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps
>                               \examples                            #
> this is folder I created it
>                               \WEB-INF                            #
> this is folder I created it
>                                \cgi
> # this is folder I created it
>                                     ------> script1.cgi
>                                     ------> script2.cgi
>
> The script runs perfectly on Apache HTTPD server. Can any one tell me
> clearly what needs to be done to get my script running.
>
> Thank you,
> Regards,
> kath

Well! I got the mistake I was doing. I was keeping the \cgi\*.cgi in
examples\WEB-INF\cgi\*.cgi under webapps folder.

But server was looking under \webpps\ROOT\.. . So I kept the \cgi
\*.cgi under
\webapps\ROOT\


Thanks for the reply Sherm.

Thank you,
Regards,
kath.



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

Date: Mon, 19 Feb 2007 15:11:15 -0600
From: Ted Davis <tdavis@gearbox.maem.umr.edu>
Subject: Re: which is more powerfull ?
Message-Id: <kh4kt2puiv3ilrpd2k5hbbfhlf0k3ffnk3@4ax.com>

On 19 Feb 2007 12:01:16 -0800, ehabaziz2001@gmail.com wrote:

>I need to process some files to create new one with OMR marks . which
>is more powerfull in processing files ? awk/sed or perl or others ?
>Thanks

Assembly language, followed by C.

That comes close to being a stupid question, and is ceratinly a troll.

-- 
T.E.D. (tdavis@gearbox.maem.umr.edu)
Remove "gearbox.maem." from address - that one is dead


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

Date: Mon, 19 Feb 2007 17:20:55 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: which is more powerfull ?
Message-Id: <m24pphwzzs.fsf@local.wv-www.com>

ehabaziz2001@gmail.com writes:

> I need to process some files to create new one with OMR marks . which
> is more powerfull in processing files ? awk/sed or perl or others ?

What a lame attempt at starting an argument.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


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

Date: Tue, 20 Feb 2007 03:37:21 +0000 (UTC)
From: Bruce Barnett <spamhater123+U070219223241@grymoire.com>
Subject: Re: which is more powerfull ?
Message-Id: <yeky7mt5wk3.fsf@grymoire.com>

ehabaziz2001@gmail.com writes:

> I need to process some files to create new one with OMR marks . which
> is more powerfull in processing files ? awk/sed or perl or others ?

one can convert sed to perl, and awk to perl.
You can't convert a generic perl to sed or awk script.

In short, perl is more powerful, but more complicated.  If you are new
to all of them, I'd use AWK.  

I think AWK is a wonderful, simple and elegant language. It has a lot
of power, and is easy to learm.

If you need to do something that AWK can't do, and can't easily fix it
by piping the results to another utility liek sed or sort, try
converting it to perl (using "a2p") and adding the new stuff to
perl. And since you know how AWK works, you get a head start on perl
by using the perl flavor of the AWK script.

-- 
Sending unsolicited commercial e-mail to this account incurs a fee of 
$500 per message, and acknowledges the legality of this contract.


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

Date: Tue, 20 Feb 2007 04:54:50 -0000
From: ptjm@interlog.com (Patrick TJ McPhee)
Subject: Re: which is more powerfull ?
Message-Id: <12tkvoq72ur2uf9@corp.supernews.com>

In article <yeky7mt5wk3.fsf@grymoire.com>,
Bruce Barnett  <spamhater123+U070219223241@grymoire.com> wrote:
% ehabaziz2001@gmail.com writes:
% 
% > I need to process some files to create new one with OMR marks . which
% > is more powerfull in processing files ? awk/sed or perl or others ?
% 
% one can convert sed to perl, and awk to perl.
% You can't convert a generic perl to sed or awk script.

Because to do that, you'd have to be able to read it.
-- 

Patrick TJ McPhee
North York  Canada
ptjm@interlog.com


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

Date: Tue, 20 Feb 2007 08:03:38 -0000
From: "Richard S. Smith" <rss@idiom.com>
Subject: Re: Win32: Need the intact ARGV string
Message-Id: <1171958618.726175@smirk>

I just wanted to thank everyone who replied to my question.  I didn't
want to post a follow-up until I figured out what was going on.

The script that was giving me all the trouble was being launched by a
BMC application that was using the "Nutcracker" compatibility
environment (it's actually an MKS product).  It was using different
calling conventions depending on whether I was calling the Perl script
or the batch file.  In the latter case it was dispatching cmd.exe which
is why I was getting different quoting behavior.

The problem was further compounded by the fact that different versions
of the product do things in different ways.  In one case it was
dispatching the MKS version of sh.exe which was in turn calling the Perl
interpreter.

So, I was comparing apples to oranges.  I had to do a detailed process
trace to find out what was really going on.  The "Procmon" program from
sysinternals.com was useful in this task.

Again, thanks.


-- 
 Richard S. Smith / Email: rss@idiom.com / Web: http://www.rssnet.org/
--


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

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 V11 Issue 153
**************************************


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