[32954] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4230 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 3 18:09:19 2014

Date: Tue, 3 Jun 2014 15:09:05 -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           Tue, 3 Jun 2014     Volume: 11 Number: 4230

Today's topics:
        binary file creation clarification <balaji.draj@gmail.com>
    Re: binary file creation clarification <rweikusat@mobileactivedefense.com>
    Re: binary file creation clarification <balaji.draj@gmail.com>
    Re: Help with an operator precedence (?) puzzle <whynot@pozharski.name>
        Perl 5.20 and CGI <cartercc@gmail.com>
    Re: Perl 5.20 and CGI <peter@makholm.net>
    Re: Perl 5.20 and CGI <jimsgibson@gmail.com>
    Re: Perl 5.20 and CGI <rweikusat@mobileactivedefense.com>
    Re: process multiple hashes <jurgenex@hotmail.com>
    Re: process multiple hashes (Tim McDaniel)
    Re: process multiple hashes <jimsgibson@gmail.com>
    Re: process multiple hashes <justin.1401@purestblue.com>
    Re: process multiple hashes <rweikusat@mobileactivedefense.com>
    Re: process multiple hashes <rweikusat@mobileactivedefense.com>
    Re: sorting file according to a unicode column ehabaziz2001@gmail.com
    Re: sorting file according to a unicode column <jurgenex@hotmail.com>
        stupid adjectives must die (was: Perl 5.20 and CGI) <rweikusat@mobileactivedefense.com>
    Re: stupid adjectives must die (was: Perl 5.20 and CGI) <cartercc@gmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Tue, 3 Jun 2014 08:51:19 -0700 (PDT)
From: IJALAB <balaji.draj@gmail.com>
Subject: binary file creation clarification
Message-Id: <fb151fb7-0bb7-4b75-a3f5-69b0f14092e2@googlegroups.com>

Hi All,=20

I have a file in the following format in txt file=20
ff68 adde ed5b 9ddc fe3d 7ad8 cf1c 2f39 c81c fbde be2a fcdf b9d9 e838 6a6c =
0d4e 493e 9d2a 5f3c cc89 490c 29c9 efad 3d7e fc1b fb2b 3cae 7e0b 9c2f 3d6a =
9df9 598e 5cfb daaa 2deb 79bd 1d99 8da8 98ab bfda b87d 194e ce2b a9db a899 =
cd6a 5af8 793c 5e1c af9e cf3c 9c9e c8bc fa9d ed9b 0bde aff8 7bcd 9fde 1abe =
4b8b 5959 4839 2b9e 0d69 1b29 3d7d 0e9f ccba 2e8b f94a cbed fe3e 5dbe ad1a =
eda9 ce1d cf7a 3fca bc8e ff08 cbda 69bf cd1d=20

This is basically a jpeg file content and i need to make this file to .bin =
file so that i want to check if the jpeg is opening fine.=20

Can someone help on how this can be done. I am trying with the following co=
de but since i have not used pack till now, i am not sure of my mistake. th=
anks for the help.=20

#!/usr/bin/perl

$buffer =3D "";
$infile =3D "Jpeg_hex.txt";
$outfile =3D "binary.bin";
open (INFILE, "<", $infile) or die "Not able to open the file. \n";
open (my $outfile, ">:raw", "binary.bin") or die "Not able to open the file=
 for writing. \n";
binmode (OUTFILE);


 local $/ =3D \1;
   while ( my $byte =3D <INFILE> ) {
   print $outfile pack('s<', $byte) ;
   }



close (INFILE) or die "Not able to close the file: $infile \n";
close ($outfile) or die "Not able to close the file: $outfile \n";



regards
bala


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

Date: Tue, 03 Jun 2014 18:11:31 +0100
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: binary file creation clarification
Message-Id: <87wqcx2a0s.fsf@sable.mobileactivedefense.com>

IJALAB <balaji.draj@gmail.com> writes:
> I have a file in the following format in txt file 
> ff68 adde ed5b 9ddc fe3d 7ad8 cf1c 2f39 c81c fbde be2a fcdf b9d9 e838
> 6a6c 0d4e 493e 9d2a 5f3c cc89 490c 29c9 efad 3d7e fc1b fb2b 3cae 7e0b
> 9c2f 3d6a 9df9 598e 5cfb daaa 2deb 79bd 1d99 8da8 98ab bfda b87d 194e
> ce2b a9db a899 cd6a 5af8 793c 5e1c af9e cf3c 9c9e c8bc fa9d ed9b 0bde
> aff8 7bcd 9fde 1abe 4b8b 5959 4839 2b9e 0d69 1b29 3d7d 0e9f ccba 2e8b
> f94a cbed fe3e 5dbe ad1a eda9 ce1d cf7a 3fca bc8e ff08 cbda 69bf cd1d
>
> This is basically a jpeg file content and i need to make this file to
> .bin file so that i want to check if the jpeg is opening fine.
>
> Can someone help on how this can be done. I am trying with the
> following code but since i have not used pack till now, i am not sure
> of my mistake. thanks for the help.

Assuming that the byte order should be identical to the one in the text
file (ie, ff68 should end up as 0xff, 0x68 and not 0x68, 0xff), the
following loop works:

my $data;
while ($data = <INFILE>) {
    for ($data) {
	/\G([0-9a-f]{4})/gc && do {
	    print $outfile (pack('H4', $1));
	    redo;
	};

	/\G\s+/gc and redo;

	/\G$/ and last;

	die("Huh?\n");
    }
}

Something like

print $outfile (pack('v', hex($1)));

could be used to convert the input 'numerically', ie, interpret ff68 as
0xff68 and write that in little-endian byte-order (bytes 0x68, 0xff).

NB: The inner for-loop shows an example of a lexical analyzer written in
Perl. /\G([0-9a-f]{4})/gc tries to match a 4-digit hex number at the
current match position. In case of success, it in converts than and
re-executed the loop. Should it fail, the /\G\s+/gc tries to match a
sequence of whitespace characters at the current match position. In case
of success, the loop is executed. Lastly /\G$/ looks for the end of the
string. If found, the inner loop is terminated. When none of the regexes
matched, the die is executed because the code doesn't know what to do
with the input. The \G anchors a regex match to the point where the last
regex match 'stopped matching', /g means 'find everything', ie, "don't
reset the match position to zero" and the /c "also, don't reset it in
case the match failed".


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

Date: Tue, 3 Jun 2014 12:03:36 -0700 (PDT)
From: IJALAB <balaji.draj@gmail.com>
Subject: Re: binary file creation clarification
Message-Id: <ef3fdcd1-7602-4de8-85e7-b57c2c769e12@googlegroups.com>

On Tuesday, June 3, 2014 10:41:31 PM UTC+5:30, Rainer Weikusat wrote:
 writes:
> 
> > I have a file in the following format in txt file 
> 
> > ff68 adde ed5b 9ddc fe3d 7ad8 cf1c 2f39 c81c fbde be2a fcdf b9d9 e838
> 
> > 6a6c 0d4e 493e 9d2a 5f3c cc89 490c 29c9 efad 3d7e fc1b fb2b 3cae 7e0b
> 
> > 9c2f 3d6a 9df9 598e 5cfb daaa 2deb 79bd 1d99 8da8 98ab bfda b87d 194e
> 
> > ce2b a9db a899 cd6a 5af8 793c 5e1c af9e cf3c 9c9e c8bc fa9d ed9b 0bde
> 
> > aff8 7bcd 9fde 1abe 4b8b 5959 4839 2b9e 0d69 1b29 3d7d 0e9f ccba 2e8b
> 
> > f94a cbed fe3e 5dbe ad1a eda9 ce1d cf7a 3fca bc8e ff08 cbda 69bf cd1d
> 
> >
> 
> > This is basically a jpeg file content and i need to make this file to
> 
> > .bin file so that i want to check if the jpeg is opening fine.
> 
> >
> 
> > Can someone help on how this can be done. I am trying with the
> 
> > following code but since i have not used pack till now, i am not sure
> 
> > of my mistake. thanks for the help.
> 
> 
> 
> Assuming that the byte order should be identical to the one in the text
> 
> file (ie, ff68 should end up as 0xff, 0x68 and not 0x68, 0xff), the
> 
> following loop works:
> 
> 
> 
> my $data;
> 
> while ($data = <INFILE>) {
> 
>     for ($data) {
> 
> 	/\G([0-9a-f]{4})/gc && do {
> 
> 	    print $outfile (pack('H4', $1));
> 
> 	    redo;
> 
> 	};
> 
> 
> 
> 	/\G\s+/gc and redo;
> 
> 
> 
> 	/\G$/ and last;
> 
> 
> 
> 	die("Huh?\n");
> 
>     }
> 
> }
> 
> 
> 
> Something like
> 
> 
> 
> print $outfile (pack('v', hex($1)));
> 
> 
> 
> could be used to convert the input 'numerically', ie, interpret ff68 as
> 
> 0xff68 and write that in little-endian byte-order (bytes 0x68, 0xff).
> 
> 
> 
> NB: The inner for-loop shows an example of a lexical analyzer written in
> 
> Perl. /\G([0-9a-f]{4})/gc tries to match a 4-digit hex number at the
> 
> current match position. In case of success, it in converts than and
> 
> re-executed the loop. Should it fail, the /\G\s+/gc tries to match a
> 
> sequence of whitespace characters at the current match position. In case
> 
> of success, the loop is executed. Lastly /\G$/ looks for the end of the
> 
> string. If found, the inner loop is terminated. When none of the regexes
> 
> matched, the die is executed because the code doesn't know what to do
> 
> with the input. The \G anchors a regex match to the point where the last
> 
> regex match 'stopped matching', /g means 'find everything', ie, "don't
> 
> reset the match position to zero" and the /c "also, don't reset it in
> 
> case the match failed".

Hi Rainer 
Your code worked perfect for my purpose. thanks a ton and thanks for the explanation of the syntax as well

regards


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

Date: Tue, 03 Jun 2014 09:33:44 +0300
From: Eric Pozharski <whynot@pozharski.name>
Subject: Re: Help with an operator precedence (?) puzzle
Message-Id: <slrnloqr28.22d.whynot@orphan.zombinet>

with <538c6c38$0$6615$9b4e6d93@newsspool4.arcor-online.net> G.B. wrote:
> On 30.05.14 18:54, Rainer Weikusat wrote:
>>> And again ... I'm pointing to evidence of "elementary" features
>>> >of Perl being puzzling. Not puzzling you, but others, obviously.
>> That's another assertion that elementary features of Perl (regarded as
>> 'elementary' because they're described on the first two pages of the
>> relevant manpage) are surely "puzzling".
> Again, "relevant"?  How so? I'd be interested in evidence
> that Perl programmers learn Perl from man pages that serve
> the same purpose that the C standard documents serve in
> the case of C. (Thus, by analogy, about C programmers who
> learn C from the standard.)

Do you take word as an evidence?  If you do, then, well, I did.  I've
read man perl and then gone everything in 'Overview' section (except
Changes and 'Language-Specific';  also, honestly, porting pages were not
actually read just a quick glance).  And those were literally man-pages,
I didn't know about perldoc, for obvious reasons.

*CUT*

-- 
Torvalds' goal for Linux is very simple: World Domination
Stallman's goal for GNU is even simpler: Freedom


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

Date: Tue, 3 Jun 2014 08:26:03 -0700 (PDT)
From: ccc31807 <cartercc@gmail.com>
Subject: Perl 5.20 and CGI
Message-Id: <a88efe4f-109c-499c-9714-e4123febc960@googlegroups.com>

I very occasionally do LAMP stacks with Perl, and I have always used CGI.pm, which has always worked well for me.

Now that Perl 5.20 has deprecated the CGI.pm, what is the more modern way to do this?

Thanks, CC.


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

Date: Tue, 03 Jun 2014 18:54:42 +0200
From: Peter Makholm <peter@makholm.net>
Subject: Re: Perl 5.20 and CGI
Message-Id: <87tx82aq7h.fsf@vps1.hacking.dk>

ccc31807 <cartercc@gmail.com> writes:

> I very occasionally do LAMP stacks with Perl, and I have always used
> CGI.pm, which has always worked well for me.
>
> Now that Perl 5.20 has deprecated the CGI.pm, what is the more modern
> way to do this?

If CGI.pm works for you and you don't want to change the way you write
web code, then you will always be able to install the CGI module from
CPAN. (Well, as long as it is maintained and not actively removed).

IF CGI.pm solves your problems then you are not forced to switch away.


As for alternatives it depends on which parts you want to replace. For
larger web-application I would recommend looking at one of the larger
frameworks: Catalyst, Mojolicious, Dancer, ...

If you just want a simple interface for handling HTTP requests, then
Plack with Plack::Request might solve your problems satisfactory.

For the HTML generation parts of CGI.pm the HTML::Tiny module seems
close to the concepts of CGI.pm, but it has been years since I have used
CGI.pm for generating HTML. Personally I prefer Template::Toolkit which
is quite another way to do it.

//Makholm


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

Date: Tue, 03 Jun 2014 10:04:20 -0700
From: Jim Gibson <jimsgibson@gmail.com>
Subject: Re: Perl 5.20 and CGI
Message-Id: <030620141004201552%jimsgibson@gmail.com>

In article <a88efe4f-109c-499c-9714-e4123febc960@googlegroups.com>,
ccc31807 <cartercc@gmail.com> wrote:

> I very occasionally do LAMP stacks with Perl, and I have always used CGI.pm,
> which has always worked well for me.
> 
> Now that Perl 5.20 has deprecated the CGI.pm, what is the more modern way to
> do this?

Lightning talk from German Perl Workshop, presenter not recorded but
said to be Sawyer X here: 
<http://perltricks.com/article/92/2014/5/27/Perl-v5-20-what-you-need-to-
know> 

(go to 5:48 near the end):

<https://www.youtube.com/watch?v=jKOqtRMT85s>


Advice:

"Use a 'proper web framework' that supports PSGI: 

Catalyst, Dancer, Web::Simple, Mojolicious, etc.

(Probably Dancer)."

-- 
Jim Gibson


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

Date: Tue, 03 Jun 2014 20:14:21 +0100
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: Perl 5.20 and CGI
Message-Id: <87iooh24c2.fsf@sable.mobileactivedefense.com>

ccc31807 <cartercc@gmail.com> writes:
> I very occasionally do LAMP stacks with Perl, and I have always used
> CGI.pm, which has always worked well for me.
>
> Now that Perl 5.20 has deprecated the CGI.pm, what is the more modern
> way to do this?

	Module removals

	The following modules will be removed from the core distribution
	in a future release, and will at that time need to be installed
	from CPAN. Distributions on CPAN which require these modules
	will need to list them as prerequisites.
        
	The core versions of these modules will now issue
	"deprecated"-category warnings to alert you to this fact. To
	silence these deprecation warnings, install the modules in
	question from CPAN.

	Note that the planned removal of these modules from core does
	not reflect a judgement about the quality of the code and should
	not be taken as a suggestion that their use be halted. Their
	disinclusion from core primarily hinges on their necessity to
	bootstrapping a fully functional, CPAN-capable Perl
	installation, not on concerns over their design.

        http://search.cpan.org/dist/perl-5.20.0/pod/perldelta.pod#Module_removals

In particular, while the "scheduled-to-be-removed" list does reflect a
judgement about the quality of the code ('quality' really means 'the
nature of something', not some kind of affirmative verdict about this
nature) namely "It smells like UNIX(*) and I HATE (!!!!1) that", it
doesn't imply that the more traditional (as seen from the perspective of
197x) concepts supposed to provide an alternative have suddenly become
'modern' because their devoted followers are meanwhile to young to know
that they're actually traditionalist.


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

Date: Mon, 02 Jun 2014 14:01:29 -0700
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: process multiple hashes
Message-Id: <5cppo9tidgotofrf3ng31cm3ar5g4kamtu@4ax.com>

Joe <juliani.moon@gmail.com> wrote:

[Please limit your line length to ~75 characters as has been a tried and
proven custom in Usenet for over 2 decades]

>I have a number of hashes stored in a config file, each contains different set of data and they all have the same data structure and will be processed in the same way. I want to build a loop to process them one at a time. Now my question is, is there a way for me to get all there hash names (as hash reference I guess), put them in an array so I can build a 'foreach' to process them? (I have all hash names share something in common, like %AAlevel, %BBlevel, %CClevel, etc., and naively wished to grab them by REGEX :)

You are asking for symbolic references. Please see archived articles
about why they are a Very Bad Idea (TM) and what to do instead.

jue


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

Date: Mon, 2 Jun 2014 23:06:24 +0000 (UTC)
From: tmcd@panix.com (Tim McDaniel)
Subject: Re: process multiple hashes
Message-Id: <lmj01g$534$1@reader1.panix.com>

In article <5cppo9tidgotofrf3ng31cm3ar5g4kamtu@4ax.com>,
J_rgen Exner  <jurgenex@hotmail.com> wrote:
>Joe <juliani.moon@gmail.com> wrote:
>
>[Please limit your line length to ~75 characters as has been a tried and
>proven custom in Usenet for over 2 decades]
>
>>I have a number of hashes stored in a config file, each contains
>>different set of data and they all have the same data structure and
>>will be processed in the same way. I want to build a loop to process
>>them one at a time. Now my question is, is there a way for me to get
>>all there hash names (as hash reference I guess), put them in an
>>array so I can build a 'foreach' to process them? (I have all hash
>>names share something in common, like %AAlevel, %BBlevel, %CClevel,
>>etc., and naively wished to grab them by REGEX :)
>
>You are asking for symbolic references. Please see archived articles
>about why they are a Very Bad Idea (TM) and what to do instead.

I think it would be good to see a sample of the existing config file,
and any sample code notions to use it.  There are different
possibilities, and by seeing existing code, it might be possible to
suggest something closer to the existing code.

-- 
Tim McDaniel, tmcd@panix.com


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

Date: Mon, 02 Jun 2014 17:11:48 -0700
From: Jim Gibson <jimsgibson@gmail.com>
Subject: Re: process multiple hashes
Message-Id: <020620141711480460%jimsgibson@gmail.com>

In article <978f2d62-bfd0-4e15-a67e-43fff8fd4d59@googlegroups.com>, Joe
<juliani.moon@gmail.com> wrote:

> This may be naive, but here is a situation:
> 
> I have a number of hashes stored in a config file, each contains different
> set of data and they all have the same data structure and will be processed
> in the same way. I want to build a loop to process them one at a time. Now my
> question is, is there a way for me to get all there hash names (as hash
> reference I guess), put them in an array so I can build a 'foreach' to
> process them? (I have all hash names share something in common, like
> %AAlevel, %BBlevel, %CClevel, etc., and naively wished to grab them by REGEX
> :)
> 
> I did some search and didn't seem to find anything close, and hope to have a
> luck here. Thanks in advance,

You need to increase the level of indirection and indexing by one.

In other words, create a %bighash that contains all of the other
hashes, indexed by the name of the hash:

  %bighash = ( AAlevel => \%AAlevel, BBlevel => \%BBlevel, ... );

Then, you can iterate over the keys of big hash, apply your regex to
the names to select them, and process (or not) the individual hashes.

-- 
Jim Gibson


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

Date: Tue, 3 Jun 2014 09:56:22 +0100
From: Justin C <justin.1401@purestblue.com>
Subject: Re: process multiple hashes
Message-Id: <m6f06b-nas.ln1@zem.masonsmusic.co.uk>

On 2014-06-02, Joe <juliani.moon@gmail.com> wrote:
> This may be naive, but here is a situation:
>
> I have a number of hashes stored in a config file, each contains different set of data and they all have the same data structure and will be processed in the same way. I want to build a loop to process them one at a time. Now my question is, is there a way for me to get all there hash names (as hash reference I guess), put them in an array so I can build a 'foreach' to process them? (I have all hash names share something in common, like %AAlevel, %BBlevel, %CClevel, etc., and naively wished to grab them by REGEX :)
>
> I did some search and didn't seem to find anything close, and hope to have a luck here. Thanks in advance,

You say the file contains hashes, are they perhaps YAML or XML, or 
some other easily parsed data encoding type? If they are then there's
probably a module for that. If they're not, why aren't they?!!!

   Justin.

-- 
Justin C, by the sea.


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

Date: Tue, 03 Jun 2014 11:55:58 +0100
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: process multiple hashes
Message-Id: <87r436jm81.fsf@sable.mobileactivedefense.com>

Joe <juliani.moon@gmail.com> writes:
> This may be naive, but here is a situation:
>
> I have a number of hashes stored in a config file, each contains
> different set of data and they all have the same data structure and
> will be processed in the same way. I want to build a loop to process
> them one at a time. Now my question is, is there a way for me to get
> all there hash names (as hash reference I guess), put them in an array
> so I can build a 'foreach' to process them? (I have all hash names
> share something in common, like %AAlevel, %BBlevel, %CClevel, etc.,
> and naively wished to grab them by REGEX :)

If the hashes are 'globlal' variables, you could loop through all keys
of the symbol table of the package they exist in (this symbol table is
accessible as a hash %package_name::, eg %main:: for package main) and
look for 'well known names', cf (will not compile with strict)

---------------
%a_hash = qw(a b c d);
%b_hash = qw(e f g h);
%c_hash = qw(i j k m);

my $cur;
for (keys(%main::)) {
    /_hash$/ or next;
    
    print("found $_\n");
    $cur = \%$_;
    print("\t$_ => $cur->{$_}\n") for keys(%$cur);
}
---------------

NB: This uses a symbolic reference (\%$_) to access the actual
hash. That can be (at least) replaced with

*{$::{$_}}{HASH}

and strict won't complain about that (%main:: can also be accessed as
%::).

Alternate idea: Reorganize your config file such that the hashes are
part of some 'top-level data structure', eg (untested)

%hashes = (
	a_hash => {a => 'b', c => 'd'},
        b_hash => {e => 'f', g => 'h'});

This avoids the need to do anything fancy to access the actual hash
given its name and you won't accidentally pick up 'unrelated things with
similar names' which also happen to exist in the symbol table.


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

Date: Tue, 03 Jun 2014 12:01:53 +0100
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: process multiple hashes
Message-Id: <87mwdujly6.fsf@sable.mobileactivedefense.com>

Justin C <justin.1401@purestblue.com> writes:
> On 2014-06-02, Joe <juliani.moon@gmail.com> wrote:
>> This may be naive, but here is a situation:
>>
>> I have a number of hashes stored in a config file, each contains
>> different set of data and they all have the same data structure and
>> will be processed in the same way. I want to build a loop to process
>> them one at a time. Now my question is, is there a way for me to get
>> all there hash names (as hash reference I guess), put them in an
>> array so I can build a 'foreach' to process them? (I have all hash
>> names share something in common, like %AAlevel, %BBlevel, %CClevel,
>> etc., and naively wished to grab them by REGEX :)
>>
>> I did some search and didn't seem to find anything close, and hope to
>> have a luck here. Thanks in advance,
>
> You say the file contains hashes, are they perhaps YAML or XML, or 
> some other easily parsed data encoding type? If they are then there's
> probably a module for that. If they're not, why aren't they?!!!

Because perl can parse Perl and Perl supports the necessary syntactical
constructs for describing complex data structures, 'config files' can be
written in Perl and then parsed with perl via do '/etc/something'.

Writing a Perl module in order to parse Perl so that people could
download it instead of using the features built into the perl-program
they already have would surely be the ultimate 'public CPAN masturbation'
exercise. Assuming someone did this (I halfway fear that someone did
really already do this, presumably, as broken XS version supposed to be
fast, as 'pure Perl implementation' which works but is regarded to be
slow and additionally as pure-Perl Perl::Tiny combining the advantages
of both aproaches: It doesn't work and does so slowly), would people
still recommend that?


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

Date: Tue, 3 Jun 2014 01:57:12 -0700 (PDT)
From: ehabaziz2001@gmail.com
Subject: Re: sorting file according to a unicode column
Message-Id: <0be3a88d-eb44-4818-a697-7e7682f5a845@googlegroups.com>

How can I eecute it under dos . Is like this ?=20

F:\COMPILER\Perl\bin\perl sorting.pl input_file.log



=D8=A8=D8=AA=D8=A7=D8=B1=D9=8A=D8=AE =D8=A7=D9=84=D8=A7=D8=AB=D9=86=D9=8A=
=D9=86=D8=8C 2 =D9=8A=D9=88=D9=86=D9=8A=D9=88=D8=8C 2014 UTC+2 9:13:37 =D9=
=85=D8=8C =D9=83=D8=AA=D8=A8 Rainer Weikusat:
> ehabaziz2001@gmail.com writes:
>=20
> > I am running perl under XP dos box.=20
>=20
> > ------------------------------------
>=20
> > I got that errors after running :
>=20
> > F:\COMPILER\Perl\bin\perl sorting.pl 1.log
>=20
>=20
>=20
> [...]
>=20
>=20
>=20
> > my $offset_start =3D 9; # importand position of the column start (count=
=20
>=20
> > from 0)
>=20
>=20
>=20
> > my $offset_end   =3D 209; # importand position of the column end   (cou=
nt=20
>=20
> > from 0)
>=20
>=20
>=20
> The 'from 0)' belongs to the comment started the respective lines
>=20
> above. It must not appear alone on a line, as it does here.


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

Date: Tue, 03 Jun 2014 08:45:56 -0700
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: sorting file according to a unicode column
Message-Id: <d6pro9p0pq5joflbr17rehmjp8kq7l8md1@4ax.com>

[full-quote intended]
ehabaziz2001@gmail.com wrote:
>How can I eecute it under dos . Is like this ? 
>
>F:\COMPILER\Perl\bin\perl sorting.pl input_file.log

May I suggest you follow proper Usenet customs when posting to Usenet?
Your chances of a useful answer would increase a lot:
- do not full-quote
- do not top-post
- do not add silly empty lines in quoted text (and wrongly attribute
them to someone else)
- limit your line length to less than 75 characters
- follow the advise in http://www.catb.org/esr/faqs/smart-questions.html

Thank you
>
>
>
>?????? ???????? 2 ?????? 2014 UTC+2 9:13:37 ?? ??? Rainer Weikusat:
>> ehabaziz2001@gmail.com writes:
>> 
>> > I am running perl under XP dos box. 
>> 
>> > ------------------------------------
>> 
>> > I got that errors after running :
>> 
>> > F:\COMPILER\Perl\bin\perl sorting.pl 1.log
>> 
>> 
>> 
>> [...]
>> 
>> 
>> 
>> > my $offset_start = 9; # importand position of the column start (count 
>> 
>> > from 0)
>> 
>> 
>> 
>> > my $offset_end   = 209; # importand position of the column end   (count 
>> 
>> > from 0)
>> 
>> 
>> 
>> The 'from 0)' belongs to the comment started the respective lines
>> 
>> above. It must not appear alone on a line, as it does here.

Did Rainer's comment solve your problem with the error message or did it
not? Would be nice to know if you are still talking about the same issue
or if you highjacked the thread and morphed it into something new.

jue


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

Date: Tue, 03 Jun 2014 21:38:28 +0100
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: stupid adjectives must die (was: Perl 5.20 and CGI)
Message-Id: <87a99t20fv.fsf_-_@sable.mobileactivedefense.com>

Rainer Weikusat <rweikusat@mobileactivedefense.com> writes:

[...]

> it doesn't imply that the more traditional (as seen from the perspective of
> 197x) concepts supposed to provide an alternative have suddenly become
> 'modern' because their devoted followers are meanwhile to young to know
> that they're actually traditionalist.

Rant continued: I think I'm really tired of the adjective 'modern' in
itself. For most practical purpose, that fell out of use at the end of
the first third of the last century when the fact that the people who
used to label themselves as 'modern' didn't represent the ultimate
culimination of human cultural history couldn't be explained away any
longer and it really doesn't mean anything except someone asserting
that his opinions are inherently more valuable than someone else's
opinions because they're his opinions and not someone else's, IOW,
whoever uses it unironically is a common dimwit --- surely an ageless
human trait but most certainly not a new one.


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

Date: Tue, 3 Jun 2014 14:35:20 -0700 (PDT)
From: ccc31807 <cartercc@gmail.com>
Subject: Re: stupid adjectives must die (was: Perl 5.20 and CGI)
Message-Id: <0c0a0dcc-e6cb-4cff-94b6-5ee51ebab8a9@googlegroups.com>

On Tuesday, June 3, 2014 4:38:28 PM UTC-4, Rainer Weikusat wrote:
> Rant continued: I think I'm really tired of the adjective 'modern' in=20
> itself. For most practical purpose, that fell out of use at the end of=20
> the first third of the last century when the fact that the people who=20
> used to label themselves as 'modern' didn't represent the ultimate=20
> culimination of human cultural history couldn't be explained away any=20
> longer and it really doesn't mean anything except someone asserting=20
> that his opinions are inherently more valuable than someone else's=20
> opinions because they're his opinions and not someone else's, IOW,=20
> whoever uses it unironically is a common dimwit --- surely an ageless=20
> human trait but most certainly not a new one.

Yeah, I hear you. I typically tend to use tools (and create applications) t=
hat are crude, simple, and primitive. Like CGI, for example. I'm comfortabl=
e with the notion that I can get the values of certain variables via HTTP, =
and pass them to a program that will produce a particular kind of output, s=
ay, an ascii file as HTML.

Some of the crude, simple, and primitive tools that I use a lot are the com=
mand interpreter (on Windows, too), vi/Vim, Perl, LaTeX, R (it originated i=
n the 1970s with S), Lisp, C, Apache, and so on. These all work well for me=
 .

On the other hand, there are some new tools that are just great, such as jQ=
uery, some R packages (e.g., ggplot2), git, etc.

I think that the main thing is to use the best tool, whether it's ancient o=
r modern. And I don't think that 'modern' is a pejorative term. Sometimes, =
something newer and better comes along, and sometimes something newer and w=
orse comes along.

CC.



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

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:

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests. 

#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 4230
***************************************


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