[30796] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2041 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Dec 8 14:09:44 2008

Date: Mon, 8 Dec 2008 11:09:08 -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           Mon, 8 Dec 2008     Volume: 11 Number: 2041

Today's topics:
    Re: Array initialization and @ARGV <xueweizhong@gmail.com>
        Credit Cards <harry.george8@gmail.com>
    Re: Help: Process data <xueweizhong@gmail.com>
        how does perl treat read-in numbers? <ela@yantai.org>
    Re: how does perl treat read-in numbers? <smallpond@juno.com>
    Re: how does perl treat read-in numbers? <tadmc@seesig.invalid>
    Re: how does perl treat read-in numbers? <jurgenex@hotmail.com>
    Re: Mathematica 7 compares to other languages <jon@ffconsultancy.com>
    Re: Mathematica 7 compares to other languages <jon@ffconsultancy.com>
    Re: Mathematica 7 compares to other languages <jon@ffconsultancy.com>
    Re: Mathematica 7 compares to other languages <xahlee@gmail.com>
        new CPAN modules on Mon Dec  8 2008 (Randal Schwartz)
    Re: PDF::Reuse and number rounding/precision <justin.0810@purestblue.com>
    Re: wget/sftp- style progress bar <jurgenex@hotmail.com>
    Re: wget/sftp- style progress bar <zen13097@zen.co.uk>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 8 Dec 2008 03:40:34 -0800 (PST)
From: Todd <xueweizhong@gmail.com>
Subject: Re: Array initialization and @ARGV
Message-Id: <7b31b701-47be-4507-b36e-06e0ce08a7fc@r15g2000prd.googlegroups.com>


I guess this is what you want:

>perl -le 'print ++$c, ": ", $_ for @ARGV'  {{1..3},5}
1: 1
2: 2
3: 3
4: 5

suppose you are using bash which has this brace expansion feture.

-Todd


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

Date: Sun, 7 Dec 2008 22:29:53 -0800 (PST)
From: "harry.george8@gmail.com" <harry.george8@gmail.com>
Subject: Credit Cards
Message-Id: <fe88999d-ce26-471f-910a-ed5c03fcc01e@i18g2000prf.googlegroups.com>

With the advent of plastic money sure you are enjoying the power to
possess different goods and services before even making payments. But
the question here is, are u really enjoying your credit worthiness or
actually paying more on the name of free credit? You may call it a
privilege but it=92s all a money making business so if you are not smart
enough using your credit cards you may end a being ripped of by banks.
Following are some considerations you should make before buying and
while using a credit card.

Brand:
Your credit card brand decides the acceptance of your card around the
globe. Some of the popular brands are Master, Visa, Visa Electron,
American express, Cirrus, Maestro etc. Master and Visa cards are most
widely accepted card brands. You should get a card with these
holograms on otherwise you would keep searching ATMS and merchants
accepting your card.

Interest rates:
Reviewing and comparing the interest rates is the preliminary thing
that has to be done. It is usually seen that credit cards giving you
offers like merchants discount, petrol surcharge waiver, gift voucher
etc. usually have a higher rate of interest. As a customer you should
purely focus on getting the lowest interest rate instead of being
carried away by the rewards and the gifts. For example ICICI bank and
SBI charge no joining fee and no annual fee but their interest rates
are as high as 45.09% and 44.25% respectively. On the other hand HDFC
charges Rs 300 as joining fee and 700 as an annual fee on their silver
card but it has a low interest rate of 41.75% both in the case of
credit and cash withdrawal.

Maximum Credit Free period:

If you really want to enjoy the free ride, you should search for a
credit card with the above feature and the one that provides more
stretch of time. Most cards provide you 48 to 50 days as grace period.

 Revolving Credit and Balance Transfer facility:
  It is not just enough to have free credit period but also flexible
repayment option. So, you stay easy even after your deadline is gone.
In the case of the credit cards with no extended credit facility you
have to pay interest on the whole amount from the day of transaction,
if you fail to pay your dues on time, but in the case of revolving
credit you can pay a part your dues (Min 5% of the principle amount)
and then pay interest only on the amount outstanding from the day of
your deadline. Cards like HSBC also provide you the option of paying
your outstandings at predefined EMIs.


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

Date: Mon, 8 Dec 2008 07:42:13 -0800 (PST)
From: Todd <xueweizhong@gmail.com>
Subject: Re: Help: Process data
Message-Id: <767ed654-a611-494b-9b1f-cb20b041bd76@k1g2000prb.googlegroups.com>



Amy Lee wrote:
> Hello,
>
> And what I want to do is count how many continuous 0 and 1 present (the
> second column). I have set up a minimal value such 5. All of them who has
> less than 5 continuous 0 and 1 will ommit and larger than or equal to 5 I
> will save as result.
>
> Could you show me some ideas to do this?
>

I'm intereted in this question, below is a simple solution given
threshold as 3:

    >cat b.txt
      18705   1
      18742   0
      18765   0
      19127   0
      19379   0
      19412   0
      19843   1
      20042   0
      229054  1
      272925  1
      292029  1
      331301  1
      331383  0
      350184  1

    # step 1: split it paragraphs
    >cat b.txt | perl -lp0e 's/(?<=0\n)(?=.*1$)|(?<=1\n)(?=.*0$)/\n/mg'
      18705   1

      18742   0
      18765   0
      19127   0
      19379   0
      19412   0

      19843   1

      20042   0

      229054  1
      272925  1
      292029  1
      331301  1

      331383  0

      350184  1

    # step 2: grep the paragraphs with > 3 lines
    >cat b.txt | perl -lp0e 's/(?<=0\n)(?=.*1$)|(?<=1\n)(?=.*0$)/\n/
mg' | perl -ln00e 'tr{\n}{\n}+1>3 and print'
      18742   0
      18765   0
      19127   0
      19379   0
      19412   0
      229054  1
      272925  1
      292029  1
      331301  1

-Todd


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

Date: Mon, 8 Dec 2008 22:04:47 +0800
From: "ela" <ela@yantai.org>
Subject: how does perl treat read-in numbers?
Message-Id: <ghj9hv$n20$1@ijustice.itsc.cuhk.edu.hk>

When i read files of numbers delimited by tab, i discover an illogical if 
condition of (1 > 37031) is fulfilled. i can only doubt that perl 
misinterprets something as string instead of number. How to check whether it 
treats it as a number or a string? 




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

Date: Mon, 8 Dec 2008 06:53:19 -0800 (PST)
From: smallpond <smallpond@juno.com>
Subject: Re: how does perl treat read-in numbers?
Message-Id: <ca5320e0-5d51-4c79-a363-baf2d8ae1ac5@l42g2000yqe.googlegroups.com>

On Dec 8, 9:04 am, "ela" <e...@yantai.org> wrote:
> When i read files of numbers delimited by tab, i discover an illogical if
> condition of (1 > 37031) is fulfilled. i can only doubt that perl
> misinterprets something as string instead of number. How to check whether it
> treats it as a number or a string?

In a numeric expression perl treats a scalar as a number.  Your
doubt is misplaced.

$n = "\t15\t";
print 1+$n;

16


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

Date: Mon, 8 Dec 2008 08:58:30 -0600
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: how does perl treat read-in numbers?
Message-Id: <slrngjqdgm.bqk.tadmc@tadmc30.sbcglobal.net>

ela <ela@yantai.org> wrote:

> Subject: how does perl treat read-in numbers?


All "read-in" data are strings.


> When i read files of numbers delimited by tab, i discover an illogical if 
> condition of (1 > 37031) is fulfilled. 


If you post a short and complete program that we can run, then we can
solve your problem. If you don't, we can't.

Have you seen the Posting Guidelines that are posted here frequently?


> i can only doubt that perl 
> misinterprets something as string instead of number. 


That cannot be it, because the condition is false even if both operands
are strings, because "1" is not greater than "3".

None of the statements below make any output...

    print "true\n" if  1  >   37031;
    print "true\n" if '1' >  '37031';
    print "true\n" if  1  gt  37031;
    print "true\n" if '1' gt '37031';


> How to check whether it 
> treats it as a number or a string? 


By examining the operator that is being used.

">" treats its operands as numbers.
"gt" treats its operands as strings.


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


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

Date: Mon, 08 Dec 2008 08:55:37 -0800
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: how does perl treat read-in numbers?
Message-Id: <19kqj45ft8d1pki7c7hsnqvrk76e7r6cmv@4ax.com>

"ela" <ela@yantai.org> wrote:
>When i read files of numbers delimited by tab, i discover an illogical if 
>condition of (1 > 37031) is fulfilled. i can only doubt that perl 
>misinterprets something as string instead of number. How to check whether it 
>treats it as a number or a string? 

No need to check anything, if a scalar is used in textual context then
it is treated as text, if it is used in numerical context then it is
treated as number (and as boolean if used in boolean context).

jue


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

Date: Mon, 08 Dec 2008 12:07:10 +0000
From: Jon Harrop <jon@ffconsultancy.com>
Subject: Re: Mathematica 7 compares to other languages
Message-Id: <4ridneQnkLrPkKDUnZ2dnUVZ8qbinZ2d@posted.plusnet>

sln@netherlands.com wrote:
> Well, its past 'tonight' and 6 hours to go till past 'tomorrow'.
> Where the hell is it Zah Zah?

Note that this program takes several days to compute in Mathematica (even
though it takes under four seconds in other languages) so don't expect to
see a genuinely optimized version any time soon... ;-)

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?u


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

Date: Mon, 08 Dec 2008 12:08:48 +0000
From: Jon Harrop <jon@ffconsultancy.com>
Subject: Re: Mathematica 7 compares to other languages
Message-Id: <4ridnecnkLopkKDUnZ2dnUVZ8qbinZ2d@posted.plusnet>

Xah Lee wrote:
> The result and speed up of my code can be verified by anyone who has
> Mathematica.

You changed the scene that is being rendered => your speedup is bogus!

Trace the scene I originally gave and you will see that your program is no
faster than mine was.

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?u


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

Date: Mon, 08 Dec 2008 13:10:32 +0000
From: Jon Harrop <jon@ffconsultancy.com>
Subject: Re: Mathematica 7 compares to other languages
Message-Id: <M-OdnaHGv7WwgaDUnZ2dnUVZ8jKdnZ2d@posted.plusnet>

Xah Lee wrote:
> For those interested in this Mathematica problem, i've now cleaned up
> the essay with additional comments here:
> 
> • A Mathematica Optimization Problem
>   http://xahlee.org/UnixResource_dir/writ/Mathematica_optimization.html

In that article you say:

> Further, if Intersect is made to take a flat sequence of argument as
> in “Intersect[o_, d_, lambda_, n_, c_, r_, s_]”, then pattern matching can
> be avoided by making it into a pure function “Function”. And when it is
> a “Function”, then Intersect or part of it may be compiled with Compile.
> When the code is compiled, the speed should be a order of magnitude
> faster.     

That is incorrect. Mathematica's Compile function cannot handle recursive
functions like Intersect. For example:

In[1]:= Compile[{n_, _Integer}, If[# == 0, 1, #0[[# n - 1]] #1] &[n]]

During evaluation of In[1]:= Compile::fun: Compilation of
(If[#1==0,1,#0[[#1 n-1]] #1]&)[Compile`FunctionVariable$435] cannot
proceed. It is not possible to compile pure functions with arguments
that represent the function itself. >>

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?u


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

Date: Mon, 8 Dec 2008 09:34:43 -0800 (PST)
From: Xah Lee <xahlee@gmail.com>
Subject: Re: Mathematica 7 compares to other languages
Message-Id: <0201522a-b15a-4401-a208-5d9af70bdd74@w24g2000prd.googlegroups.com>

On Dec 8, 5:10 am, Jon Harrop <j...@ffconsultancy.com> wrote:
> Xah Lee wrote:
> > For those interested in this Mathematica problem, i've now cleaned up
> > the essay with additional comments here:
>
> > =E2=80=A2 A Mathematica Optimization Problem
> >  http://xahlee.org/UnixResource_dir/writ/Mathematica_optimization.html
>
> In that article you say:
>
> > Further, if Intersect is made to take a flat sequence of argument as
> > in =E2=80=9CIntersect[o_, d_, lambda_, n_, c_, r_, s_]=E2=80=9D, then p=
attern matching can
> > be avoided by making it into a pure function =E2=80=9CFunction=E2=80=9D=
 . And when it is
> > a =E2=80=9CFunction=E2=80=9D, then Intersect or part of it may be compi=
led with Compile.
> > When the code is compiled, the speed should be a order of magnitude
> > faster.

> That is incorrect. Mathematica's Compile function cannot handle recursive
> functions like Intersect.

i didn't claim it can. You can't expect to have a fast or good program
if you code Java style in a functional lang.

Similarly, if you want code to run fast in Mathematica, you don't just
slap in your OCaml code into Mathematica syntax and expect it to work
fast.

If you are a Mathematica expert, you could make it recurse yet have
the speed as other langs. First, by changing your function's form, to
avoid pattern matching, and rewrite your bad recursion. That is what i
claimed in the above paragraph. Read it again to see.

> For example:
> In[1]:=3D Compile[{n_, _Integer}, If[# =3D=3D 0, 1, #0[[# n - 1]] #1] &[n=
]]
>
> During evaluation of In[1]:=3D Compile::fun: Compilation of
> (If[#1=3D=3D0,1,#0[[#1 n-1]] #1]&)[Compile`FunctionVariable$435] cannot
> proceed. It is not possible to compile pure functions with arguments
> that represent the function itself. >>

Mathematica's Compile function is intended to speed up numerical
computation. To want Compile to handle recursion in the context of
Mathematica's programing features, is not something possible even in
theoretical sense.

Scheme lisp implementations can compile recursive code, but lisp is a
lower level lang than Mathematica, where perhaps the majority of
Mathematica's builtin functions can equate to 10 or more lines of
lisp, and any of its hundreds math functions equates to entire
libraries of other langs. It is reasonable, but silly, to expect
Mathematica's Compile function to compile any code in Mathematica.

Perhaps in the future version of Mathematica, its Compile function can
handle basic recursive forms.

Also, in this discussion, thanks to Thomas M Hermann's $20 offered to
me for my challenge to you, that i have taken the time to show working
code that demonstrate many problems in your code. Unless you think my
code and replies to you are totally without merit or fairness, but
otherwise you should acknowledge it, in whole or in parts you agree,
in a honest and wholehearted way, instead of pushing on with petty
verbal fights.

  Xah
=E2=88=91 http://xahlee.org/

=E2=98=84


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

Date: Mon, 8 Dec 2008 05:42:23 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Mon Dec  8 2008
Message-Id: <KBJMIn.sKI@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.

App-ZofCMS-Plugin-BasicLWP-0.0101
http://search.cpan.org/~zoffix/App-ZofCMS-Plugin-BasicLWP-0.0101/
very basic "uri-to-content" style LWP plugin for ZofCMS. 
----
App-ZofCMS-Plugin-DateSelector-0.0101
http://search.cpan.org/~zoffix/App-ZofCMS-Plugin-DateSelector-0.0101/
plugin to generate and "parse" <select>s for date/time input 
----
App-ZofCMS-Plugin-DateSelector-0.0111
http://search.cpan.org/~zoffix/App-ZofCMS-Plugin-DateSelector-0.0111/
plugin to generate and "parse" <select>s for date/time input 
----
App-ZofCMS-Plugin-DateSelector-0.0112
http://search.cpan.org/~zoffix/App-ZofCMS-Plugin-DateSelector-0.0112/
plugin to generate and "parse" <select>s for date/time input 
----
App-ZofCMS-Plugin-FormChecker-0.0331
http://search.cpan.org/~zoffix/App-ZofCMS-Plugin-FormChecker-0.0331/
plugin to check HTML form data. 
----
CGI-Ex-2.27
http://search.cpan.org/~rhandom/CGI-Ex-2.27/
CGI utility suite - makes powerful application writing fun and easy 
----
CPAN-Reporter-1.1704
http://search.cpan.org/~dagolden/CPAN-Reporter-1.1704/
Adds CPAN Testers reporting to CPAN.pm 
----
Catalyst-Model-DBI-0.20
http://search.cpan.org/~alexp/Catalyst-Model-DBI-0.20/
DBI Model Class 
----
Coro-5.12
http://search.cpan.org/~mlehmann/Coro-5.12/
the only real threads in perl 
----
Data-TreeDumper-Renderer-DHTML-0.08
http://search.cpan.org/~nkh/Data-TreeDumper-Renderer-DHTML-0.08/
DHTML renderer for Data::TreeDumper 
----
Data-Util-0.40
http://search.cpan.org/~gfuji/Data-Util-0.40/
A selection of utilities for data and data types 
----
Devel-MRO-0.01
http://search.cpan.org/~gfuji/Devel-MRO-0.01/
Provides mro functions for XS, creating mro_compat.h 
----
File-Copy-Recursive-0.38
http://search.cpan.org/~dmuey/File-Copy-Recursive-0.38/
Perl extension for recursively copying files and directories 
----
Finance-Quote-Hollywood-2
http://search.cpan.org/~kryde/Finance-Quote-Hollywood-2/
download Hollywood Stock Exchange quotes 
----
IO-Async-0.18
http://search.cpan.org/~pevans/IO-Async-0.18/
a collection of modules that implement asynchronous filehandle IO 
----
IPC-Open3-Utils-0.1
http://search.cpan.org/~dmuey/IPC-Open3-Utils-0.1/
Functions for facilitating some of the most common open3() uses 
----
Mail-SPF-Iterator-1.03
http://search.cpan.org/~sullr/Mail-SPF-Iterator-1.03/
iterative SPF lookup 
----
MojoX-Session-0.04
http://search.cpan.org/~vti/MojoX-Session-0.04/
Session management for Mojo 
----
MooseX-Role-Matcher-0.01
http://search.cpan.org/~doy/MooseX-Role-Matcher-0.01/
generic object matching based on attributes and methods 
----
MySQL-Slurp-0.27
http://search.cpan.org/~ctbrown/MySQL-Slurp-0.27/
Use PIPEs to write directly to a MySQL table 
----
Net-Libdnet-0.91
http://search.cpan.org/~gomor/Net-Libdnet-0.91/
binding for Dug Song's libdnet 
----
Net-RTorrent-0.04
http://search.cpan.org/~zag/Net-RTorrent-0.04/
Perl interface to rtorrent via XML-RPC. 
----
OpenOffice-OODoc-2.107
http://search.cpan.org/~jmgdoc/OpenOffice-OODoc-2.107/
The Perl Open OpenDocument Connector 
----
POE-Component-Client-Keepalive-0.24
http://search.cpan.org/~rcaputo/POE-Component-Client-Keepalive-0.24/
manage connections, with keep-alive 
----
Padre-Plugin-Alarm-0.01
http://search.cpan.org/~fayland/Padre-Plugin-Alarm-0.01/
Alarm Clock in Padre 
----
Parse-Marpa-0.221_000
http://search.cpan.org/~jkegl/Parse-Marpa-0.221_000/
Generate Parsers from any BNF grammar 
----
Perl-Critic-Pulp-9
http://search.cpan.org/~kryde/Perl-Critic-Pulp-9/
some add-on perlcritic policies 
----
Perlwikipedia-1.4.2
http://search.cpan.org/~dcollins/Perlwikipedia-1.4.2/
a Wikipedia bot framework written in Perl 
----
Pod-Manual-0.08_01
http://search.cpan.org/~yanick/Pod-Manual-0.08_01/
Aggregates several PODs into a single manual 
----
Provision-Unix-0.32
http://search.cpan.org/~msimerson/Provision-Unix-0.32/
provision accounts on unix systems 
----
RDF-Simple-0.401
http://search.cpan.org/~mthurn/RDF-Simple-0.401/
read and write RDF without complication 
----
Text-DHCPLeases-v0.8
http://search.cpan.org/~cvicente/Text-DHCPLeases-v0.8/
Parse DHCP leases file from ISC dhcpd. 
----
Text-Hyphen-0.11
http://search.cpan.org/~kappa/Text-Hyphen-0.11/
determine positions for hyphens inside words 
----
WebService-Backlog-0.07
http://search.cpan.org/~yamamoto/WebService-Backlog-0.07/
Perl interface to Backlog. 
----
sapnwrfc-0.22
http://search.cpan.org/~piers/sapnwrfc-0.22/
SAP Netweaver RFC support for Perl 


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/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion


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

Date: Mon, 08 Dec 2008 15:42:57 -0000
From: Justin C <justin.0810@purestblue.com>
Subject: Re: PDF::Reuse and number rounding/precision
Message-Id: <25f8.493d4081.2ab6a@zem>

On 2008-12-05, J. Gleixner <glex_no-spam@qwest-spam-no.invalid> wrote:
> Justin C wrote:
>> I'm using PDF::Reuse to produce output in a PDF template. The problems
>> I'm having are:
>> * I need to print currency values with two decimal places regardless of 
>>   whether the number has anything after the decimal point.
>> * I need to print values for weight with up to four digits after the
>>   decimal point (if there are digits).
>> 
>> What PDF::Reuse is doing is only printing integars where there is
>> nothing after the decimal for my currency output, and printing fourteen
>> digits after the decimal in places where I need rounding.
>> 
>> I'm using the following to produce output:
>> 
>>     prText($x, $y, $string)
>> 
>> $x and $y are horizontal and vertical coordinates to the location to
>> start printing $string.
>> 
>> Normally I'd use printf to force rounding or decimals where none are
>> displayed, but I can't see a way of using that here. The PDF::Reuse
>> documentation does't provide help on this problem either. 
>
> Complete guess..
>
> prText($x, $y, sprintf( "%.2f", $string) );

Thanks J, and Bug Bear. Also thanks to Ted, though I shan't be needing
the currency symbols at this time.

The thought of using sprintf.... hmmmm, actually, I don't know
sprintf... I read that as printf, but put tried sprintf. I've now read
the sprintf doc, I'm sure I could have used this many times before! It
surprises me how far one can get without knowledge of some commands...

Excellent stuff, problem solved.

	Justin.

-- 
Justin C, by the sea.


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

Date: Sun, 07 Dec 2008 22:12:02 -0800
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: wget/sftp- style progress bar
Message-Id: <1kepj45urf6g0ave2lk4bbfe0bcqjv0cc0@4ax.com>

Harry <simonsharry@gmail.com> wrote:
>Now, I can obviously use the <backspace> character to seek to earlier
>point on the current line. But before I do all of that manual and ad
>hoc computations, I'm wondering if there's any helpful package that
>has already though through this problem... so that I deal only in
>higher abstractions such as fields, field lengths, left/right
>justified field value, truncate field value (vs extend field length if
>value is longer), etc.

I'm not absolutely sure what you are looking for but maybe Curses will
be of some help.

jue


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

Date: 08 Dec 2008 11:42:50 GMT
From: Dave Weaver <zen13097@zen.co.uk>
Subject: Re: wget/sftp- style progress bar
Message-Id: <493d083a$0$1349$fa0fcedb@news.zen.co.uk>

On Sun, 7 Dec 2008 20:07:52 -0800 (PST), Harry <simonsharry@gmail.com> wrote:
> 
>  I have a list of length operations I need to carry out. For each item
>  in this list, I want to display current progress on a single line only
>  (instead of multiple lines per item) as is done by such programs as
>  wget and sftp.
> 

Did you check CPAN?

I found this after only a couple of seconds:

http://search.cpan.org/~fluffy/Term-ProgressBar-2.09/

which looks to be the sort of thing you want.




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

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 2041
***************************************


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