> Golfers do NOT understand the DAMAGE they are doing to Perl's
> perception outside the Perl community,
What is golf?
Hi Marc,
Perl "golf" is a game where one reduce the number of characters {key
"strokes"} used in a perl program, just like how golf players seek to hit
balls into series
On Aug 17, 2011, at 6:58 PM, Randal L. Schwartz wrote:
> Golfers do NOT understand the DAMAGE they are doing to Perl's
> perception outside the Perl community,
What is golf?
Marc
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@
On 11-08-17 06:53 PM, Bryan R Harris wrote:
How can I do a 3-argument open on STDIN? This doesn't work because the
3-argument open won't open STDIN when you tell it to open "-".
**
@files = ("-");
for (@files) {
print reverse readfile($_);
}
sub read
> ""John" == "John W Krahn" writes:
>> That's deprecated though, if not already gone. (Looks gone in Perl
>> 5.14.) It was a readily-admitted misfeature.
John> Unless you're playing golf. :-)
I'd argue that Golf itself is a misfeature of Perl. More like a bug.
Golfers do NOT understan
On 18/08/2011 01:35, John Delacour wrote:
At 17:53 -0500 17/08/2011, Bryan R Harris wrote:
How can I do a 3-argument open on STDIN? This doesn't work because the
3-argument open won't open STDIN when you tell it to open "-".
**
@files = ("-");
for (@files)
At 17:53 -0500 17/08/2011, Bryan R Harris wrote:
How can I do a 3-argument open on STDIN? This doesn't work because the
3-argument open won't open STDIN when you tell it to open "-".
**
@files = ("-");
for (@files) {
print reverse readfile($_);
}
[...]
Shlomi Fish wrote:
"Wagner, David --- Sr Programmer Analyst --- CFS"
wrote:
Since a \n is at end, then could use split like:
for my $dtl ( sort {$a<=> $b} split(/\n/, $a_string) ) {
One can also do split(/^/m, $a_string) to split into lines while preserving the
newlines.
It wi
On Wed, Aug 17, 2011 at 5:59 PM, ERIC KRAUSE wrote:
> The problem for me is the line endings I think. When I open the
> file and read in one line, I get the whole file. I think the
> line endings are ^p (MS paragraph markers), but I can't open
> the file to view them. The files are huge, 150M or b
On Wed, Aug 17, 2011 at 6:53 PM, Bryan R Harris
wrote:
> How can I use the "safe" 3-argument open and still be able to read off a
> pipe?
What I have done in the past is manually compare the filename to '-'
and skip the opening and just assign STDIN to my file handle.
use strict;
use warnings;
How can I do a 3-argument open on STDIN? This doesn't work because the
3-argument open won't open STDIN when you tell it to open "-".
**
@files = ("-");
for (@files) {
print reverse readfile($_);
}
sub readfile {
open(my $fh,"<",$_[0]) or die "$me
On 8/17/11 Wed Aug 17, 2011 2:59 PM, "ERIC KRAUSE"
scribbled:
> Hello all,
> I am beating my head against the wall, any help would be appreciated.
>
> I have a file:
> / // / m / cvfbcbf/ A123/ / / ///
> / // / m / cvfbcbf/ A234/ / / ///
> / /
Hello all,
I am beating my head against the wall, any help would be appreciated.
I have a file:
/ // / m / cvfbcbf/ A123/ / / ///
/ // / m / cvfbcbf/ A234/ / / ///
/ // / m / cvfbcbf/ B123/ / / ///
There is spaces in the b
> "RP" == Rajeev Prasad writes:
RP> foreach $line (@arr1){
RP> foreach (@arr2) {
RP> chomp($_);
RP> @arr3 = split(/ /,$_);
RP> $mystringvar = eval "qq{$line}"; <--this
suggestion came from web search.
and it is a very bad idea. string eval is very dange
Thanks all.
I tried below it works:
foreach $line (@arr1){
foreach (@arr2) {
chomp($_);
@arr3 = split(/ /,$_);
$mystringvar = eval "qq{$line}"; <--this suggestion
came from web search.
print $mystringvar;
}
}
i got the key line in this code from web. thx to all c
Hi Rajeev,
On Tue, 16 Aug 2011 17:38:16 -0700 (PDT)
Rajeev Prasad wrote:
>
>
> foreach $str1 (@arr1){
> foreach (@arr2) {
> @arr3 = split(/ /,"$_");
> print "array = @arr3 element0 = $arr3[0] element1 = $arr3[1]"; #this
> is just to check, it showing values 0 and 1 as correctly assigne
Hi,
On Tue, 16 Aug 2011 11:09:35 -0500
"Wagner, David --- Sr Programmer Analyst --- CFS"
wrote:
> >-Original Message-
> >From: Matt [mailto:lm7...@gmail.com]
> >Sent: Tuesday, August 16, 2011 10:04
> >To: beginners@perl.org
> >Subject: Sorting a String
> >
> >I believe you can sort an ar
>-Original Message-
>From: Matt [mailto:lm7...@gmail.com]
>Sent: Tuesday, August 16, 2011 10:04
>To: beginners@perl.org
>Subject: Sorting a String
>
>I believe you can sort an array like so:
>
>sort @my_array;
>
>I need to sort a string though.
>
>I have $a_string that contains:
>
>4565 lin
17 matches
Mail list logo