[30254] in Perl-Users-Digest
Perl-Users Digest, Issue: 1497 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 1 09:09:51 2008
Date: Thu, 1 May 2008 06:09:15 -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, 1 May 2008 Volume: 11 Number: 1497
Today's topics:
Re: cperl-mode.el <nospam-abuse@ilyaz.org>
Re: cperl-mode.el <benkasminbullock@gmail.com>
Re: Devel::SmallProf claims "return 1" needs much time <w.c.humann@arcor.de>
Re: Frequency in large datasets (Ben Bullock)
Re: Frequency in large datasets <1usa@llenroc.ude.invalid>
Re: Help: Replace Help <1usa@llenroc.ude.invalid>
Re: Help: Replace Help <jurgenex@hotmail.com>
Re: Help: Replace Help <1usa@llenroc.ude.invalid>
Re: Help: Replace Help <benkasminbullock@gmail.com>
Just the bit in brackets would have been sufficient <me@theworld.universe>
Lawyers prosecuters media and programmers (I need HELP! logan.cuurwitz@gmail.com
new CPAN modules on Thu May 1 2008 (Randal Schwartz)
Re: Read 20 lines when pressing n for next <get@bentsys.com>
Re: Read 20 lines when pressing n for next <uri@stemsystems.com>
Will Perl 6 be usable as a procedure language? <usenet@larseighner.com>
Re: Will Perl 6 be usable as a procedure language? <bugbear@trim_papermule.co.uk_trim>
Re: Will Perl 6 be usable as a procedure language? <Peter@PSDT.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 1 May 2008 05:23:26 +0000 (UTC)
From: Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: cperl-mode.el
Message-Id: <fvbk4e$1qa8$1@agate.berkeley.edu>
[A complimentary Cc of this posting was sent to
Ben Bullock
<benkasminbullock@gmail.com>], who wrote in article <fvb2vo$hl3$1@ml.accsnet.ne.jp>:
> > ??? Emacs distribution contains a broken, unsupported version of
> > cperl-mode.el. The source directory contains a working (but
> > somewhat outdated) supported version.
>
> The current Emacs distribution (22.1) contains a version with a
> copyright of 2007
From when updating a copyright message counts as a maintainance?
>, which works very well - it isn't broken.
Says who? Do you monitor for bug reports, and how they are "fixed"?
> What it looks like is a fork. But the above comment about
> cperl-mode.el in the Emacs tree being out of date and broken is
> itself now out of date.
I have no idea what you want to say here...
Yours,
Ilya
------------------------------
Date: Thu, 1 May 2008 19:10:12 +0900
From: "Ben Bullock" <benkasminbullock@gmail.com>
Subject: Re: cperl-mode.el
Message-Id: <fvc4uf$pa5$1@ml.accsnet.ne.jp>
"Ilya Zakharevich" <nospam-abuse@ilyaz.org> wrote in message
news:fvbk4e$1qa8$1@agate.berkeley.edu...
>> The current Emacs distribution (22.1) contains a version with a
>> copyright of 2007
>
> From when updating a copyright message counts as a maintainance?
Obviously it doesn't, but the file at least appears to be newer than the one
in the Perl source code.
>>, which works very well - it isn't broken.
>
> Says who? Do you monitor for bug reports, and how they are "fixed"?
I'm only describing my own experience. It isn't "broken" in the sense of
being unuseable. I'm writing Perl code almost every day & using the
emacs-source cperl-mode.el, and have yet to notice any serious bugs. The
only thing which I've noticed is that it has an annoying habit of instantly
complaining if it can't find the end of a here string or regular expression,
which is kind of silly since usually one doesn't write the end of the thing
immediately after writing the beginning of it.
>> What it looks like is a fork. But the above comment about
>> cperl-mode.el in the Emacs tree being out of date and broken is
>> itself now out of date.
>
> I have no idea what you want to say here...
What I want to say I thought was clear, but apparently not. I raised the
issue of cperl-mode.el due to the FAQ question apparently being out of date.
If you have a different story, perhaps you can spell it out for us ignorant
people.
Anyway, you're the author of cperl-mode.el, something probably not many
people noticed from reading the discussion, so thank you for making this
mode, which is useful to me.
------------------------------
Date: Thu, 1 May 2008 06:07:49 -0700 (PDT)
From: Wolfram Humann <w.c.humann@arcor.de>
Subject: Re: Devel::SmallProf claims "return 1" needs much time !?
Message-Id: <682316a1-f733-4cad-bd8a-84711316276a@2g2000hsn.googlegroups.com>
On 30 Apr., 23:52, xhos...@gmail.com wrote:
> Wolfram Humann <w.c.hum...@arcor.de> wrote:
>
> I'm not sure, but I think that by restricting your packages that way, all
> the time spent in a non-monitored package will get attributed to the
> most recently executed statement which is in one of the monitored packages=
.
> That statement is likely to be a "return".
I never thought of that but it sounds quite possible. Thanks for the
hint.
> It looks like DBM::Deep is trying to change from a module to tie hashes to=
> disk with as little differences as possible (behvior-wise) from a regular
> Perl hash; and instead turn into a full-fledged ACID database. =A0I think
> that that is unfortunate. =A0Perhaps a code fork is in order.
I rather think that during the major rework to version 1.000 a few
things got introduced that make the module unnecessary slow. I posted
here http://groups.google.com/group/DBM-Deep/browse_thread/thread/9ae2ae3013=
0a49f7
what I think is one major problem. I would appreciate comments if you
have the time to look into that.
If my profiling results are worth anything, code like "sub engine
{ $_[0]{engine} }" (in Engine.pm) is also a bad idea because it's
called so often. And then "$e =3D $self->engine" is just two characters
less than "$e =3D $self->{engine}" and probably much slower. But I still
need to ask Rob Kinyon if there are any reasons I don't know for these
subs.
Wolfram
------------------------------
Date: Thu, 1 May 2008 05:06:04 +0000 (UTC)
From: benkasminbullock@gmail.com (Ben Bullock)
Subject: Re: Frequency in large datasets
Message-Id: <fvbj3s$l7u$1@ml.accsnet.ne.jp>
A. Sinan Unur <1usa@llenroc.ude.invalid> wrote:
> Cosmic Cruizer <XXjbhuntxx@white-star.com> wrote in
> news:Xns9A90C3D86EFCEccruizermydejacom@207.115.17.102:
>
>> I've been able to reduce my dataset by 75%, but it still leaves me
>> with a file of 47 gigs. I'm trying to find the frequency of each line
>> using:
>>
>> open(TEMP, "< $tempfile") || die "cannot open file
>> $tempfile:
>> $!";
>> foreach (<TEMP>) {
>
> Well, that is simply silly. You have a huge file yet you try to read all
> of it into memory. Ain't gonna work.
I'm not sure why it's silly as such - perhaps he didn't know that
"foreach" would read all the file into memory.
> If the number of unique lines is small relative to the number of total
> lines, I do not see any difficulty if you get rid of the boneheaded for
> loop.
Again, why is it "boneheaded"? The fact that foreach reads the entire
file into memory isn't something I'd expect people to know
automatically.
------------------------------
Date: Thu, 01 May 2008 11:26:40 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Frequency in large datasets
Message-Id: <Xns9A914BB8375E2asu1cornelledu@127.0.0.1>
benkasminbullock@gmail.com (Ben Bullock) wrote in
news:fvbj3s$l7u$1@ml.accsnet.ne.jp:
> A. Sinan Unur <1usa@llenroc.ude.invalid> wrote:
>> Cosmic Cruizer <XXjbhuntxx@white-star.com> wrote in
>> news:Xns9A90C3D86EFCEccruizermydejacom@207.115.17.102:
>>
...
>>> foreach (<TEMP>) {
>>
>> Well, that is simply silly. You have a huge file yet you try to read
>> all of it into memory. Ain't gonna work.
>
> I'm not sure why it's silly as such - perhaps he didn't know that
> "foreach" would read all the file into memory.
Well, I assumed he didn't. But this is one of those things, had I found
myself doing it, after spending hours and hours trying to work out a way
of processing the file, I would have slapped my forehead and said, "now
that was just a silly thing to do". Coupled with the "ain't" I assumed
my meaning was clear. I wasn't calling the OP names, but trying to get a
message across very strongly.
>> If the number of unique lines is small relative to the number of
>> total lines, I do not see any difficulty if you get rid of the
>> boneheaded for loop.
>
> Again, why is it "boneheaded"?
Because there is no hope of anything working so long as that for loop is
there.
> The fact that foreach reads the entire file into memory isn't
> something I'd expect people to know automatically.
Maybe this helps:
From perlfaq3.pod:
<blockquote>
* How can I make my Perl program take less memory?
...
Of course, the best way to save memory is to not do anything to waste it
in the first place. Good programming practices can go a long way toward
this:
* Don't slurp!
Don't read an entire file into memory if you can process it line by
line. Or more concretely, use a loop like this:
</blockquote>
Maybe you would like to read the rest.
So, calling the for loop boneheaded is a little stronger than "Bad
Idea", but then what is simply a bad idea with a 200 MB file (things
will still work but less efficiently) is boneheaded with a 47 GB file
(there is no chance of the program working).
There is a reason "Don't slurp!" appears with an exclamation mark and as
the first recommendation in the FAQ list answer.
Hope this helps you become more comfortable with the notion that reading
a 47 GB file is a boneheaded move. It is boneheaded if I do it, if Larry
Wall does it, if Superman does it ... you get the picture I hope.
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
------------------------------
Date: Thu, 01 May 2008 12:46:53 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Help: Replace Help
Message-Id: <Xns9A9159526E9BCasu1cornelledu@127.0.0.1>
Amy Lee <openlinuxsource@gmail.com> wrote in
news:pan.2008.05.01.12.29.37.709103@gmail.com:
> Re: Help: Replace Help
You have just wasted your subject line by repeating the word 'Help'.
Clearly, by posting a question here, you are asking for help. Repeating
the word 'help' does not serve any useful purpose.
> This is my file contents.
>
>>seq1
> ACGU
>>seq2
> GUACCGU
>
> And I wanna replace A to C, C to A, G to U, U to G. So from my point
> the reversed file should be viewed like this.
>
>>seq1
> CAUG
>>seq2
> UGCAAUG
>
> This is my codes.
You are missing
use strict;
use warnings;
> if (@ARGV == 1)
> {
> $file = $ARGV[0];
> unless (-e $file)
> {
> print "***Error: $file dose not exist.\n";
> next;
> }
> unless (open $FILE_IN, '<', $file)
> {
> print "***Error: Cannot read $file.\n";
> next;
> }
I do not understand what the 'next's are for. You should not send error
messages to STDOUT lest it also contain output you would like to use
further. You should show the reason for the error in your error messages
by including the $! variable. In short, replace all of the above with:
my ($file) = @ARGV;
open my $FILE_IN, '<', $file
or die "Cannot open '$file': $!";
Now, if you are processing files in a loop, replace die with warn.
Let's suppose $_ contains ACGU
> s/A/C/g;
Now it is CCGU.
> s/C/A/g;
Now it is AAGU.
> s/G/U/g;
Now it is AAUU.
> s/U/G/g;
Now it is AAGG.
I am assuming this is not what you wanted.
> And I don't wanna
s/wanna/want to/
wanna makes you sound childish.
> use BioPerl
Well, I do not know a thing about BioPerl so ...
#!/usr/bin/perl
use strict;
use warnings;
my %subst = qw( A C C A G U U G );
my @strings = qw( ACGU GUACCGU );
print "Before:\t@strings\n";
s/([ACGU])/$subst{$1}/g for @strings;
print "After\t@strings\n";
__END__
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
------------------------------
Date: Thu, 01 May 2008 12:50:48 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: Help: Replace Help
Message-Id: <qnej14dj5bqq9nhe9h9bkqt126l29qivll@4ax.com>
Amy Lee <openlinuxsource@gmail.com> wrote:
>>seq1
>ACGU
>>seq2
>GUACCGU
>
>And I wanna replace A to C, C to A, G to U, U to G. So from my point the
>reversed file should be viewed like this.
>
>>seq1
>CAUG
>>seq2
>UGCAAUG
>
>This is my codes.
[4 individual s///]
>So how to solve this kind of order problem? I suppose that the replacement
>must process at the same time.
Long-winded option: replace A with some temporary value, e.g. X, then C
to A, then X to C. And then the same for G and U.
Much better option: use tr{}{}
tr {ACGU}{CAUG};
jue
------------------------------
Date: Thu, 01 May 2008 12:55:43 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Help: Replace Help
Message-Id: <Xns9A915AD1CF2FCasu1cornelledu@127.0.0.1>
Amy Lee <openlinuxsource@gmail.com> wrote in
news:pan.2008.05.01.12.50.39.674261@gmail.com:
> Sorry, I did a principle mistake in my post.
>
> I hope replace A to U, U to A, C to G, G to C.
You can easily adapt both Jurgen's (better for single character lookup
table driven substitutions) or mine to work with whatever you need.
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
------------------------------
Date: Thu, 1 May 2008 13:02:21 +0000 (UTC)
From: Ben Bullock <benkasminbullock@gmail.com>
Subject: Re: Help: Replace Help
Message-Id: <fvcf0t$pa6$1@ml.accsnet.ne.jp>
On Thu, 01 May 2008 20:29:38 +0800, Amy Lee wrote:
> So how to solve this kind of order problem? I suppose that the
> replacement must process at the same time.
For single letters you can use
tr/ACGU/CAUG/;
If the strings to swap are longer than a single character,
s/A/unlikely/g;
s/C/A/g;
s/unlikely/C/g;
s/G/unlikely/g;
s/U/G/g;
s/unlikely/U/g;
where "unlikely" is a string which is unlikely to occur in your data.
------------------------------
Date: Thu, 1 May 2008 09:49:39 +0100
From: "Carl" <me@theworld.universe>
Subject: Just the bit in brackets would have been sufficient
Message-Id: <JeSdndk9L9m-GYTVnZ2dnUVZ8sGvnZ2d@bt.com>
comp.sys.ibm.pc.games.strategic
------------------------------
Date: Thu, 1 May 2008 05:43:17 -0700 (PDT)
From: logan.cuurwitz@gmail.com
Subject: Lawyers prosecuters media and programmers (I need HELP!)
Message-Id: <89550948-2163-4e7b-8c2a-2af43d4a54cd@34g2000hsh.googlegroups.com>
On May 1, 8:49 am, "Carl" <m...@theworld.universe> wrote:
> comp.sys.ibm.pc.games.strategic
Ignore Carl. He is a government zio-nazi out to get me because of a
deal with Stardock/GPGNet
------------------------------
Date: Thu, 1 May 2008 04:42:18 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Thu May 1 2008
Message-Id: <K06AEI.18qt@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.
Algorithm-LBFGS-0.177
http://search.cpan.org/~laye/Algorithm-LBFGS-0.177/
Perl extension for L-BFGS
----
App-SVN-Bisect-0.1
http://search.cpan.org/~infinoid/App-SVN-Bisect-0.1/
----
App-SVN-Bisect-0.2
http://search.cpan.org/~infinoid/App-SVN-Bisect-0.2/
----
Bluepay-Bluepay20Post-0.10
http://search.cpan.org/~cpkois/Bluepay-Bluepay20Post-0.10/
----
CPAN-Mini-0.569
http://search.cpan.org/~rjbs/CPAN-Mini-0.569/
create a minimal mirror of CPAN
----
Catalyst-Controller-SOAP-0.9
http://search.cpan.org/~druoso/Catalyst-Controller-SOAP-0.9/
Catalyst SOAP Controller
----
Catalyst-Plugin-Session-Store-DOD-0.01
http://search.cpan.org/~recordond/Catalyst-Plugin-Session-Store-DOD-0.01/
Store your sessions in a database using Data::ObjectDriver.
----
Catalyst-View-TT-0.27
http://search.cpan.org/~mramberg/Catalyst-View-TT-0.27/
Template View Class
----
DBD-Pg-2.6.2
http://search.cpan.org/~turnstep/DBD-Pg-2.6.2/
PostgreSQL database driver for the DBI module
----
DateTime-Format-XSD-0.1
http://search.cpan.org/~druoso/DateTime-Format-XSD-0.1/
Format DateTime according to xsd:dateTime
----
Digest-SHA-5.47
http://search.cpan.org/~mshelor/Digest-SHA-5.47/
Perl extension for SHA-1/224/256/384/512
----
Digest-SHA-PurePerl-5.47
http://search.cpan.org/~mshelor/Digest-SHA-PurePerl-5.47/
Perl implementation of SHA-1/224/256/384/512
----
Games-Go-SGF-0.08
http://search.cpan.org/~deg/Games-Go-SGF-0.08/
Parse and dissect Standard Go Format files
----
Gtk2-Ex-CellLayout-Base-2
http://search.cpan.org/~kryde/Gtk2-Ex-CellLayout-Base-2/
basic Gtk2::CellLayout implementation functions
----
Gtk2-Ex-TickerView-3
http://search.cpan.org/~kryde/Gtk2-Ex-TickerView-3/
scrolling ticker display widget
----
Gtk2-GladeXML-OO-0.40
http://search.cpan.org/~strzelec/Gtk2-GladeXML-OO-0.40/
Drop-in replacement for Gtk2::GladeXML with object oriented interface to Glade.
----
Gtk2-GladeXML-OO-0.41
http://search.cpan.org/~strzelec/Gtk2-GladeXML-OO-0.41/
Drop-in replacement for Gtk2::GladeXML with object oriented interface to Glade.
----
HTML-Perlinfo-1.50
http://search.cpan.org/~accardo/HTML-Perlinfo-1.50/
Display a lot of Perl information in HTML format
----
HTTP-Proxy-0.22
http://search.cpan.org/~book/HTTP-Proxy-0.22/
A pure Perl HTTP proxy
----
Ham-Callsign-0.3
http://search.cpan.org/~hardaker/Ham-Callsign-0.3/
----
Image-BoxModel-0.11
http://search.cpan.org/~mbp/Image-BoxModel-0.11/
Module for defining boxes on an image and putting things on them
----
Kephra-0.3.9_1
http://search.cpan.org/~lichtkind/Kephra-0.3.9_1/
crossplatform, CPAN-installable GUI-Texteditor along perllike Paradigms
----
Keystone-Resolver-1.22
http://search.cpan.org/~mirk/Keystone-Resolver-1.22/
an OpenURL resolver
----
Moose-0.43
http://search.cpan.org/~stevan/Moose-0.43/
A postmodern object system for Perl 5
----
Net-FireEagle-1.1
http://search.cpan.org/~simonw/Net-FireEagle-1.1/
access Yahoo's new FireEagle location service
----
Net-SIP-0.45_3
http://search.cpan.org/~sullr/Net-SIP-0.45_3/
Framework SIP (Voice Over IP, RFC3261)
----
Net-Server-Mail-ESMTP-SIZE-0.01
http://search.cpan.org/~jlmartin/Net-Server-Mail-ESMTP-SIZE-0.01/
add support for the SIZE ESMTP extension to Net::Server::Mail
----
Parse-Marpa-0.211_002
http://search.cpan.org/~jkegl/Parse-Marpa-0.211_002/
Earley's algorithm with LR(0) precomputation
----
Pod-Html-1.09_01
http://search.cpan.org/~dland/Pod-Html-1.09_01/
module to convert pod files to HTML
----
Proc-SetUser-v0.1
http://search.cpan.org/~dmartin/Proc-SetUser-v0.1/
carefully drop root privileges
----
RDF-Simple-Serialiser-Notation3-1.003
http://search.cpan.org/~mthurn/RDF-Simple-Serialiser-Notation3-1.003/
----
REST-Google-1.0.2
http://search.cpan.org/~ejs/REST-Google-1.0.2/
access Google REST (aka AJAX) API from Perl
----
RSH-ConfigFile-1.0.9
http://search.cpan.org/~mluker/RSH-ConfigFile-1.0.9/
Configuration File
----
Rose-DBx-Object-Renderer-0.04
http://search.cpan.org/~danny/Rose-DBx-Object-Renderer-0.04/
Web UI Rendering for Rose::DB::Object
----
Test-HTTP-0.11
http://search.cpan.org/~mml/Test-HTTP-0.11/
Test HTTP interactions.
----
Text-Phonetic-1.04
http://search.cpan.org/~maros/Text-Phonetic-1.04/
A module implementing various phonetic algorithms
----
Text-Unaccent-PurePerl-0.04
http://search.cpan.org/~pjacklam/Text-Unaccent-PurePerl-0.04/
remove accents from characters
----
WWW-Favicon-0.01
http://search.cpan.org/~typester/WWW-Favicon-0.01/
perl module to detect favicon url
----
WWW-Favicon-0.02
http://search.cpan.org/~typester/WWW-Favicon-0.02/
perl module to detect favicon url
----
WebService-Recruit-Aikento-0.0.1
http://search.cpan.org/~mtl/WebService-Recruit-Aikento-0.0.1/
An Interface for Aikento Web Service
----
WebService-Recruit-Akasugu-0.0.1
http://search.cpan.org/~mtl/WebService-Recruit-Akasugu-0.0.1/
An Interface for Akasugu.net Web Service
----
WebService-Recruit-AkasuguUchiiwai-0.0.1
http://search.cpan.org/~mtl/WebService-Recruit-AkasuguUchiiwai-0.0.1/
An Interface for AkasuguUchiiwai Web Service
----
WebService-Recruit-Eyeco-0.0.1
http://search.cpan.org/~mtl/WebService-Recruit-Eyeco-0.0.1/
An Interface for Eyeco Web Service
----
WebService-Recruit-HotPepperBeauty-0.0.1
http://search.cpan.org/~mtl/WebService-Recruit-HotPepperBeauty-0.0.1/
An Interface for HotPepperBeauty Web Service
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: Wed, 30 Apr 2008 22:59:24 -0700
From: "Gordon Etly" <get@bentsys.com>
Subject: Re: Read 20 lines when pressing n for next
Message-Id: <67t4hvF2qdnkcU1@mid.individual.net>
A. Sinan Unur wrote:
> Chris Mattern <syscjm@sumire.gwu.edu> wrote in
> news:slrng1h584.r80.syscjm@sumire.gwu.edu:
>
> > On 2008-04-30, A. Sinan Unur <1usa@llenroc.ude.invalid> wrote:
> > > s9uzaa@gmail.com wrote in news:37b9eb38-e188-4dc2-b3a7-
> > > 5f09cc3b81ea@a70g2000hsh.googlegroups.com:
> > >
> > > > I would like to write a perl script with the following criteria
> > > > match.
> > >
> > > Give it a shot. Then post any questions you might encounter
> > > (please
> > > read the posting guidelines first).
> > >
> > > > 1. open any text file taken the name from the command line.
> > > > 2. read top 20 lines and stops, then
> > > > 3. ask to press letter "n or p" (for next/previous) to print
> > > > next
> > > > or previous 20 lines.
> > > > would appreciate any kind of help.
> > > > 4. must have subroutine used.
> > >
> > > Look up $. in perldoc perlvar
> > >
> > I got $5 that says this is homework. "must have subroutine used" is
> > a dead giveaway.
>
> Agreed. Which is why he does not get any fish before showing his
> attempts at fishing for himself ;-)
Why do you all just assume it's a homework assignment? Could it not just
as well be a simplified work project? I would not be at all surprised if
this was something handed down by one's boss or project manager, and
written in a simplified form (which is what one *should* do, no?) I
really see little point to make such an assumption, and I'm sure no one
likes being talked down to.
--
G.Etly
------------------------------
Date: Thu, 01 May 2008 07:08:19 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Read 20 lines when pressing n for next
Message-Id: <x74p9i4i3h.fsf@mail.sysarch.com>
>>>>> "GE" == Gordon Etly <get@bentsys.com> writes:
>> > > > 1. open any text file taken the name from the command line.
>> > > > 2. read top 20 lines and stops, then
>> > > > 3. ask to press letter "n or p" (for next/previous) to print
>> > > > next
>> > > > or previous 20 lines.
>> > > > would appreciate any kind of help.
>> > > > 4. must have subroutine used.
GE> Why do you all just assume it's a homework assignment? Could it
GE> not just as well be a simplified work project? I would not be at
GE> all surprised if this was something handed down by one's boss or
GE> project manager, and written in a simplified form (which is what
GE> one *should* do, no?) I really see little point to make such an
GE> assumption, and I'm sure no one likes being talked down to.
gack, you again? having done a bit of perl, written requirements and
assigned tasks, i would have never said 'must use a subroutine'. that
plus the wording of the other requirements reeks of homework. but you
again seem to take offense at what is patently obvious to all the others
here. why don't you stop doing that and actually either answer his
homework assignment by giving him a fish or stfu. did you even notice
that the assignment is really a simple form of more/less written in
perl? how could that be a real world project assignment? your comment
insults the theoretical project manager by saying he would rewrite
more/less in perl for no reason. how dare you insult him? what gives you
the right to decide he is a poor project manager? maybe he doesn't know
about more/less? maybe he needs a version in perl for some unknown
reason you can't comprehend? i prefer to take the easier assumption
(occam's razor and all) that is is a homework assignment.
now go sit in the corner of the classroom facing the walls!
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Free Perl Training --- http://perlhunter.com/college.html ---------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
------------------------------
Date: Thu, 01 May 2008 00:12:20 -0500
From: Lars Eighner <usenet@larseighner.com>
Subject: Will Perl 6 be usable as a procedure language?
Message-Id: <slrng1ik5d.2l20.usenet@debranded.larseighner.com>
Will perl 6 be usable as a procedure language?
--
Lars Eighner <http://larseighner.com/> usenet@larseighner.com
Countdown: 264 days to go.
------------------------------
Date: Thu, 01 May 2008 12:00:32 +0100
From: bugbear <bugbear@trim_papermule.co.uk_trim>
Subject: Re: Will Perl 6 be usable as a procedure language?
Message-Id: <RJudnVHmNYtNP4TVnZ2dnUVZ8rOdnZ2d@plusnet>
Lars Eighner wrote:
> Will perl 6 be usable as a procedure language?
>
They'll be hellish backwards compatibility issues
if it isn't!
BugBear
------------------------------
Date: Thu, 01 May 2008 12:40:39 GMT
From: Peter Scott <Peter@PSDT.com>
Subject: Re: Will Perl 6 be usable as a procedure language?
Message-Id: <pan.2008.05.01.12.37.12.389478@PSDT.com>
On Thu, 01 May 2008 12:00:32 +0100, bugbear wrote:
> Lars Eighner wrote:
>> Will perl 6 be usable as a procedure language?
>>
>
> They'll be hellish backwards compatibility issues
> if it isn't!
Backwards compatibility with what?
Are you thinking that Perl 6 is intended to be backwards compatible with
Perl 5? It isn't, and it won't be. The runtime will be able to use Perl
5 modules, but that's a different story.
--
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/
------------------------------
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 1497
***************************************