[24508] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6688 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jun 14 09:05:48 2004

Date: Mon, 14 Jun 2004 06:05:08 -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           Mon, 14 Jun 2004     Volume: 10 Number: 6688

Today's topics:
    Re: Beginner Perl/CGI Book <richard@zync.co.uk>
    Re: Contructing a dir. tree <Joe.Smith@inwap.com>
    Re: Contructing a dir. tree (Anno Siegel)
    Re: foreach ($a, $b, $c)... <uri@stemsystems.com>
    Re: Invisible Array Loop Counter? <Joe.Smith@inwap.com>
        MIDI::realtime and soundcard.ph (Alythh)
    Re: Perl 6 (was: 2 naive questions: Perl 6; Perl vs. sh <bik.mido@tiscalinet.it>
    Re: Perl cgi on Windows 2003 Server fails (Hallvard ?strem)
        Pointer to array? <corleone@godfather.com>
    Re: Pointer to array? <postmaster@castleamber.com>
    Re: Pointer to array? <gnari@simnet.is>
    Re: Pointer to array? <Joe.Smith@inwap.com>
    Re: Pointer to array? <Joe.Smith@inwap.com>
        redirect as POST with hidden fields <rgasiore@wp.pl>
    Re: redirect as POST with hidden fields <nospam@bigpond.com>
    Re: redirect as POST with hidden fields <rgasiore@wp.pl>
    Re: redirect as POST with hidden fields <noreply@gunnar.cc>
    Re: redirect as POST with hidden fields <rgasiore@wp.pl>
    Re: redirect as POST with hidden fields <nospam@bigpond.com>
    Re: Taint mode and PERL5LIB <nobull@mail.com>
    Re: wrap a really long line <gnari@simnet.is>
    Re: wrap a really long line <kuujinbo@hotmail.com>
    Re: wrap a really long line (Anno Siegel)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 14 Jun 2004 11:57:58 +0100
From: "Richard Gration" <richard@zync.co.uk>
Subject: Re: Beginner Perl/CGI Book
Message-Id: <cak0bm$5he$1@news.freedom2surf.net>

In article <rp4zc.71250$qA5.39426@newssvr29.news.prodigy.com>,
"norfernuman" <norfernuman@yahoo.com> wrote:

> Perhaps a tie and a PHP book? ;-)

Comedy :-)


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

Date: Mon, 14 Jun 2004 09:04:34 GMT
From: Joe Smith <Joe.Smith@inwap.com>
Subject: Re: Contructing a dir. tree
Message-Id: <CSdzc.39324$0y.22938@attbi_s03>

Paul Lalli wrote:

>>my $count      = 0;
> 
> That's an almost-completely worthless initialization

But not completely worthless.
It's something that should be allowed without criticism.
	-Joe


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

Date: 14 Jun 2004 09:26:27 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Contructing a dir. tree
Message-Id: <cajr03$ajl$1@mamenchi.zrz.TU-Berlin.DE>

Joe Smith  <Joe.Smith@inwap.com> wrote in comp.lang.perl.misc:
> Paul Lalli wrote:
> 
> >>my $count      = 0;
> > 
> > That's an almost-completely worthless initialization
> 
> But not completely worthless.
> It's something that should be allowed without criticism.

The initialization is unnecessary, in the given context it makes
absolutely no difference.

In Perl, the need to initialize a variable is an exception, so it
tells the reader something when it's done.  Unnecessary initializations
make the program less clear than it could be.

Anno


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

Date: Mon, 14 Jun 2004 03:20:29 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: foreach ($a, $b, $c)...
Message-Id: <x7659uvn9e.fsf@mail.sysarch.com>

>>>>> "KS" == Ken Sington <ken_sington@nospam_abcdefg.com> writes:

  KS> folks are too kind.
  KS> yeah, i read the guide lines.

  KS> I thought I was asking the right q. guess not.

you asked the right question but with too little information. do you see
the difference? and as many have said, the phrase 'doesn't work' all by
itself is useless and carries no information. context is all.

  KS> well, the problem was solved.
  KS> I was just playing around with foreach loops.

and you never showed what the real problem was nor your 'solution'

  KS> but thanks folks.

  KS> great hobby, that PERL.

then pick up another hobby like juggling swiss army chainsaws. if you
want help and are asked for more information, you are supposed to give
it. 

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: Mon, 14 Jun 2004 08:58:48 GMT
From: Joe Smith <Joe.Smith@inwap.com>
Subject: Re: Invisible Array Loop Counter?
Message-Id: <cNdzc.39304$0y.15942@attbi_s03>

Ben Morrow wrote:

> Quoth Joe Smith <Joe.Smith@inwap.com>:
> 
>>Paul Lalli wrote:
>>
>>
>>>On Tue, 1 Jun 2004, zzapper wrote:
>>>
>>>>print join "",@t;
>>>
>>>(on another note, there is no reason to join a sequence of elements with
>>>the empty string.  (Non-interpolated) arrays are printed in that manner by
>>>default.  (Unless of course you've changed $,)
> 
> 
> ..which can be a good reason, when you're not sure what $, is.
> 
> 
>>There is a reason: Efficiency.
>>
>>If I recall correctly,
>>   print @t;
>>is like
>>   print $_ for @t;
> 
> 
> Not at all; it is (exactly) like
> 
> print join $, => @t;


I was referring to Uri's statements regarding "print rarely, print late".
http://groups.google.com/groups?selm=x7y8ou6316.fsf%40mail.sysarch.com

	-Joe


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

Date: 14 Jun 2004 05:07:42 -0700
From: alythh@netscape.net (Alythh)
Subject: MIDI::realtime and soundcard.ph
Message-Id: <6a25ba72.0406140407.68ef0a90@posting.google.com>

I'm trying to use the MIDI::Realtime it to generate music from an
evolving cellular automata, and listen to it - clearly it isnt
practical to save the MIDI data, and I prefer streaming.
Sadly I have problems with this module:

I got:
Operator or semicolon missing before &__foo_bar___ at (eval
482)[/usr/lib/perl5/5.6.1/i386-linux/linux/soundcard.ph:511] line 1.
Ambiguous use of & resolved as operator & at (eval
482)[/usr/lib/perl5/5.6.1/i386-linux/linux/soundcard.ph:511] line 1.

where I have in soundcard.ph:
eval 'sub SEQ_PM_DEFINES () {\'int\'  &__foo_bar___;}' unless
defined(&SEQ_PM_DEFINES);

somebody ever did have this problem? Know perhaps how to help me???

thanks!


Alessandro Magni


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

Date: Mon, 14 Jun 2004 13:04:18 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Perl 6 (was: 2 naive questions: Perl 6; Perl vs. shell scripts)
Message-Id: <cd0rc0h5n71gfqk3n22oql5no3q2hkq1pl@4ax.com>

On Sun, 13 Jun 2004 13:19:03 +0200, Daniel Pfeiffer
<occitan@esperanto.org> wrote:

>What I have seen of perl6 scares me to hell!

Well, some of the things I've seen/understood of Perl6 scare me and
some fascinate me.

As I wrote in another post/thread, I have a *slight* impression that
while on the one hand it will definitely still be *Perl*, OTOH it will
be *slightly* less magic...

>The syntax of scalars, lists and hashes is completely changed.  Right now
     ^^^^^^

Semantics, I'd say...

>logically a single value is a scalar and written with $ no matter where it
>comes from.  In the future this will be way confusing with @ or % to access

Yes, I agree that it will take some time to get used to the new
behaviour(s), and this will probably be the biggest PITA. I genuinely
wonder wether one day I'll regret Perl5 handling of these things or
complain about how things used to be bad those days...
;-)

Oh, and once (IIRC) I had heard one thing about Perl6 that I could not
find again later on, namely that it would have had a parser
configurable at runtime. Was that just an idea that was subsequently
rejected?


Michele
-- 
#!/usr/bin/perl -lp
BEGIN{*ARGV=do{open $_,q,<,,\$/;$_}}s z^z seek DATA,11,$[;($,
=ucfirst<DATA>)=~s x .*x q^~ZEX69l^^q,^2$;][@,xe.$, zex,s e1e
q 1~BEER XX1^q~4761rA67thb ~eex ,s aba m,P..,,substr$&,$.,age
__END__


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

Date: 14 Jun 2004 02:57:03 -0700
From: hallvardost@hotmail.com (Hallvard ?strem)
Subject: Re: Perl cgi on Windows 2003 Server fails
Message-Id: <79b0e251.0406140157.35725c78@posting.google.com>

Perl version is ActiveState 5.8.0 for Win32. 

*.pl files execute just fine from the prompt or by clicking in
Windows. In other words, system path and file associations should be
OK.

IIS is not installed on the server at all, as long as I'm not
intending to use it. My FirstClass Server provides SMTP and POP3 as
well as web services, and it should not depend on Windows IIS -- if
that's the case, that would be a shame. At least, this was not the
case in Windows NT 4.0 where an identical web server setup has been
delivering CGI for years.

The big question is what could be the difference between NT and 2003
in this respect, when everything else is identical?

I've been wondering a bit about MIME, but have not experienced before
that FCS CGI were depending on MIME definitions (...like in Apache.
Nevertheless, a test installation of Apache shows the same symptoms --
Perl CGI scripts don't run). A few experiments in that direction were
not very successfull either. And again, my MIME configuration didn't
create any problems for CGI scripts on Windows NT.

Anyone having an Apache installation on Windows 2003 Server with a
working Perl CGI setup?

ChrisO <ceo@nospam.on.net> wrote in message news:<cqLyc.1022$Pt.879@newssvr19.news.prodigy.com>...
> Hallvard ?strem wrote:
> > Thanks for your help, Kevin. The problem persists even if the server
> > application runs as the current user, that is a user who can execute
> > perl scripts from the DOS prompt.
> > 
> > FirstClass CGI setup is quite simple and doesn't require any
> > configuration other than the cgi-bin folder being installed in the
> > appropriate folder on the file system. The script should execute as
> > long as it finds the file in the cgi-bin path, and it does if it is
> > e.g. a precompiled script.
> > 
> > Since my server setup worked just fine on Windows NT, I'm quite sure
> > my problem must be related to Perl/Windows 2003 Server somehow. Since
> > Perl works fine from the prompt, I also believe it to be more likely
> > related to the Windows 2003 Server setup, but how is still a mystery
> > to me. I'm out of ideas...
> > 
> > Hallvard
> > 
> 
> I, for one, would be a little curious as to which Perl you are running 
> as well.  The symptoms you've described don't directly implicate the 
> version of Perl, but I'm curious nonetheless.  The version you specified 
> doesn't sound like ActiveState Perl which I consider to be the de facto 
> standard in the Windows world.  Your Perl of course wouldn't *have* to 
> be ASPN in order to work, hence my curiosity.
> 
> -ceo


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

Date: Mon, 14 Jun 2004 17:24:39 +0900
From: Vito Corleone <corleone@godfather.com>
Subject: Pointer to array?
Message-Id: <20040614172439.69a1cf5a.corleone@godfather.com>

I have an 'if' inside a 'for' like this:

--- cut ---
for (my $x = 0; $x < 100; $x++) {
  if ($status eq "demo") {
    $link = "demo.html";
  }
  else {
    $link = $row[$x]->{link};
  }
  print $link;
}
--- cut ---

How can I take the 'if' out from the loop? I want to make it looks like
this:

--- cut ---
if ($status eq "demo") {
  $link = "demo.html";
}
else {
  $link = ???? ## Here I don't know
               ## I want something like '$row[$x]->{link}'
}

for (my $x = 0; $x < 100; $x++) {
  print $link; ## Should print "demo.html"
               ## Or the value of $row[$x]->{link}
}    

How can I do this?

Regards,
Vito


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

Date: Mon, 14 Jun 2004 04:23:02 -0500
From: John Bokma <postmaster@castleamber.com>
Subject: Re: Pointer to array?
Message-Id: <40cd6e79$0$198$58c7af7e@news.kabelfoon.nl>



Vito Corleone wrote:

> I have an 'if' inside a 'for' like this:
> 
> --- cut ---
> for (my $x = 0; $x < 100; $x++) {
>   if ($status eq "demo") {
>     $link = "demo.html";
>   }
>   else {
>     $link = $row[$x]->{link};
>   }
>   print $link;
> }
> --- cut ---
> 
> How can I take the 'if' out from the loop? I want to make it looks like
> this:
> 
> --- cut ---
> if ($status eq "demo") {
>   $link = "demo.html";
> }
> else {
>   $link = ???? ## Here I don't know
>                ## I want something like '$row[$x]->{link}'
> }
> 
> for (my $x = 0; $x < 100; $x++) {
>   print $link; ## Should print "demo.html"
>                ## Or the value of $row[$x]->{link}
> }    
> 
> How can I do this?

if ($status eq 'demo') {
	print 'demo.html' x 100;
} else {
	for (my $x = 0; $x < 100; $x++) {
              print $row[$x]->{link};
	}
}

Better to put the 100 in a constant

-- 
John                               MexIT: http://johnbokma.com/mexit/
                            personal page:       http://johnbokma.com/
    Experienced Perl programmer available:     http://castleamber.com/
             Happy Customers: http://castleamber.com/testimonials.html


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

Date: Mon, 14 Jun 2004 09:08:40 -0000
From: "gnari" <gnari@simnet.is>
Subject: Re: Pointer to array?
Message-Id: <cajpr8$h88$1@news.simnet.is>

"Vito Corleone" <corleone@godfather.com> wrote in message
news:20040614172439.69a1cf5a.corleone@godfather.com...
> I have an 'if' inside a 'for' like this:
>
> --- cut ---
> for (my $x = 0; $x < 100; $x++) {
>   if ($status eq "demo") {
>     $link = "demo.html";
>   }
>   else {
>     $link = $row[$x]->{link};
>   }
>   print $link;
> }
> --- cut ---
>
> How can I take the 'if' out from the loop?

you do not explain why.
what is wrong with it as it is ?

if you just dont like the look of the if,
you might prefer:
  $link=($status eq 'demo')?$link:$row[$x]->{link};

if your data structure allows it, you might:
    if ($status eq "demo") {
        $row[$_]->{link} = "demo.html" for (0..99);
    }
    for (my $x = 0; $x < 100; $x++) {
        print $row[$_]->{link};
    }

but I do not know what the gain would be.

maybe you are having a X-Y problem:
the problem is something else, but
you *think* that it will be solved by changing your
loop, so you ask about that, without telling us
the real problem.

gnari






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

Date: Mon, 14 Jun 2004 10:09:19 GMT
From: Joe Smith <Joe.Smith@inwap.com>
Subject: Re: Pointer to array?
Message-Id: <jPezc.27600$2i5.8382@attbi_s52>

Vito Corleone wrote:

>   $link = ???? ## Here I don't know
>                ## I want something like '$row[$x]->{link}'

No, that can only be done inside the for() loop.

You could use 'if' to bypass the loop.

   if ($status eq "demo) {
     print "demo.html" for (0..99);
   } else {
     print $row[$_]->{link} for (0..99);
   }

	-Joe


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

Date: Mon, 14 Jun 2004 10:13:42 GMT
From: Joe Smith <Joe.Smith@inwap.com>
Subject: Re: Pointer to array?
Message-Id: <qTezc.32760$eu.31846@attbi_s02>

Vito Corleone wrote:

> I have an 'if' inside a 'for' like this:
> 
> --- cut ---
> for (my $x = 0; $x < 100; $x++) {
>   if ($status eq "demo") {
>     $link = "demo.html";
>   }
>   else {
>     $link = $row[$x]->{link};
>   }
>   print $link;
> }
> --- cut ---
> 
> How can I take the 'if' out from the loop?

Have you considered using a reference to a function?

   my $subr;
   if ($status eq "demo") {
     $subr = sub { "demo.html"; };
   } else {
     $subr = sub { my $x = shift; $row[$x]->{link}; }
   }
   for my $y (0..99) {
     print $subr->($y);
   }

	-Joe


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

Date: Mon, 14 Jun 2004 12:46:09 +0200
From: "Radek G." <rgasiore@wp.pl>
Subject: redirect as POST with hidden fields
Message-Id: <cajvhl$dkn$1@nemesis.news.tpi.pl>

Hello to All
I have heavy problem. I would like to describe it - please write any
suggestions.
The Problem:
I have a form requiring some values to be entered - some of them are
mandatory some of the them are not. Submiting The Form  targets other
script(script no 2), where is checked if mandatory fields was filled. If all
mandatory fields was not entered scpript should REDIRECT to previous form
(script no 1) with marked (red color) empty mandatory fields. All  rest
fileds should have preselected values according to prevoisusly entered.
The problem is: redirect as sending a http heading with ulr is not enoght. I
need redirect as 'POST' becouse there are some hidden fileds with big values
which must be all the time stored.
If you know some methods to redirect as 'POST' with setting values to some
'virtual' hidden fileds in perl please write it direct to my e-mail.

btw: I know one method: generated some html with form with hidden fileds and
onLoad submit this form. But I need some much profesional method.

PS: Please don't write me that project structure is wrong ect, or I should
browse more deeple trought documentation ;). - I'm fixing someone else job
and now It must be done this way (I other way I have to change about 25000
code lines:) ).

best Regards
rgasiore <eye>
rgasiore@wp.pl





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

Date: Mon, 14 Jun 2004 20:57:16 +1000
From: Gregory Toomey <nospam@bigpond.com>
Subject: Re: redirect as POST with hidden fields
Message-Id: <3489025.KyNeUqRWLx@GMT-hosting-and-pickle-farming>

Radek G. wrote:

> 
> PS: Please don't write me that project structure is wrong ect, or I should
> browse more deeple trought documentation

The group is about Perl programming, not website design design.

gtoomey


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

Date: Mon, 14 Jun 2004 13:21:48 +0200
From: "Radek G." <rgasiore@wp.pl>
Subject: Re: redirect as POST with hidden fields
Message-Id: <cak1kf$o7g$1@nemesis.news.tpi.pl>

yes...and I'm asking about code examples, libs or something like that not
about htmls ect...

regards
rgasiore
<eye>





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

Date: Mon, 14 Jun 2004 13:32:14 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: redirect as POST with hidden fields
Message-Id: <2j5hcaFt2pplU1@uni-berlin.de>

[ Don't post the same question in different messages to multiple
newsgroups! ]

Radek G. wrote:
> The problem is: redirect as sending a http heading with ulr is not
> enoght. I need redirect as 'POST' becouse there are some hidden
> fileds with big values which must be all the time stored.

libwww-perl might be what you need.

     perldoc LWP

     perldoc lwpcook

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl



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

Date: Mon, 14 Jun 2004 14:47:43 +0200
From: "Radek G." <rgasiore@wp.pl>
Subject: Re: redirect as POST with hidden fields
Message-Id: <cak6h3$btf$1@atlantis.news.tpi.pl>

Thanks for usfull information :P  - better you avoid  help like this -
helpless.
I did all I could in free time - and as You could guess (but You didn't) now
my time is out - that why I've posted it here, not becouse I'm lazy.
best regards
rgasiore<eye>

Uzytkownik "Gunnar Hjalmarsson" <noreply@gunnar.cc> napisal w wiadomosci
news:2j5hcaFt2pplU1@uni-berlin.de...
> [ Don't post the same question in different messages to multiple
> newsgroups! ]
>
> Radek G. wrote:
> > The problem is: redirect as sending a http heading with ulr is not
> > enoght. I need redirect as 'POST' becouse there are some hidden
> > fileds with big values which must be all the time stored.
>
> libwww-perl might be what you need.
>
>      perldoc LWP
>
>      perldoc lwpcook
>
> -- 
> Gunnar Hjalmarsson
> Email: http://www.gunnar.cc/cgi-bin/contact.pl
>




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

Date: Mon, 14 Jun 2004 23:02:14 +1000
From: Gregory Toomey <nospam@bigpond.com>
Subject: Re: redirect as POST with hidden fields
Message-Id: <1141668.kOf2svDvW9@GMT-hosting-and-pickle-farming>

Radek G. wrote:

> yes...and I'm asking about code examples, libs or something like that not
> about htmls ect...
> 
> regards
> rgasiore
> <eye>

Your post mentions HTML, hidden fields, and redirects (usually performed by
a web server).

Why do you think this has anything to do with Perl?

gtoomey


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

Date: 14 Jun 2004 12:47:48 +0100
From: Brian McCauley <nobull@mail.com>
Subject: Re: Taint mode and PERL5LIB
Message-Id: <u9n0368hnp.fsf@wcl-l.bham.ac.uk>

kj <socyl@987jk.com> writes:

> When running under taint mode (-T switch), $ENV{PERL5LIB} is ignored.
> This presents a problem to CGI scripts that want to run in taint
> mode but need libraries installed in directories not mentioned in
> the default value of @INC [1].

If you can configure your web server to ignore the #! line in the CGI
scripts and envoke them via an explicit perl command line then you can
put -I switches in that command line.

If you can't do that see the module "perl5lib" on CPAN.

> Then again, is running under taint mode really necessary past the
> development and testing phase?

Yes, it is probably wise.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Mon, 14 Jun 2004 02:28:37 -0000
From: "gnari" <gnari@simnet.is>
Subject: Re: wrap a really long line
Message-Id: <caj2d5$dtb$1@news.simnet.is>

"Ken Sington" <ken_sington@nospam_abcdefg.com> wrote in message
news:KXOdnbq1X6-1aVHdRWPC-g@speakeasy.net...
> criticism is good.
> here's my function to wrap really long lines:
> very basic.
>
> # wrap long lines ###################################
> sub wrapLine {
>      my ($line) = @_;
>      $line =~ s/.{70}/$&\n/g;

the use of $& degrades performance, if that is an issue.

>      return "$line";  #(yeah, I know, last value is returned
automatically)

a) yes, but the last value is not what you think!
b) unnecessary use of quotes. better is:
       returm $line;

>
> PROG 1
> my $longline="blah, " x 300;
> print &wrapLine($longline);

the '&' not needed

> PROG 2
> open READ, "twoMB_bigFile.txt;

syntax error, missing failure check

>
> while (@big) {
>      print &wrapLine($_);
> }

you want foreach (@big) here, not while, because
    a) the test (@big) never changes from true to false
    b) $_ is not set to anything useful

there is more, but start with these.

gnari






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

Date: Mon, 14 Jun 2004 15:48:57 +0900
From: ko <kuujinbo@hotmail.com>
Subject: Re: wrap a really long line
Message-Id: <2j502sFs7nouU1@uni-berlin.de>

Ken Sington wrote:
> criticism is good.
> here's my function to wrap really long lines:
> very basic.

[ snip code ]

> Anyone think there's a better way to wrap a long line?

Try Text::Wrap. Its a standard module. Look at Example 2 in the Synopsis 
of the documentation for how to set the column size and deal with a 
'word' that goes past the column size that you specify.

HTH -keith


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

Date: 14 Jun 2004 07:48:47 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: wrap a really long line
Message-Id: <cajl8v$7f1$1@mamenchi.zrz.TU-Berlin.DE>

Ken Sington  <ken_sington@nospam_abcdefg.com> wrote in comp.lang.perl.misc:
> criticism is good.
> here's my function to wrap really long lines:
> very basic.
> 
> # wrap long lines ###################################
> sub wrapLine {
>      my ($line) = @_;
>      $line =~ s/.{70}/$&\n/g;
>      return "$line";  #(yeah, I know, last value is returned  automatically)
> }


    sub wrapline { join "\n", shift =~ /(.{1,70})/g }

Anno


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

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


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