Re: Interpolate variable in a __DATA__ block

2008-03-29 Thread Gunnar Hjalmarsson
Rob Dixon wrote: Gunnar Hjalmarsson wrote: Trudge wrote: I'm trying to get a script to interpolate variable values in a __DATA__ block if possible. This is a kind of alternative to a full- blown template method. I'm not sure if I can even do what I want, hence my posting here. It can be don

Re: Interpolate variable in a __DATA__ block

2008-03-29 Thread Rob Dixon
Gunnar Hjalmarsson wrote: > > Trudge wrote: >> >> I'm trying to get a script to interpolate variable values in a >> __DATA__ block if possible. This is a kind of alternative to a full- >> blown template method. I'm not sure if I can even do what I want, >> hence my posting here. > > It can be done

Re: sort without ignoring hyphens

2008-03-29 Thread John W. Krahn
[EMAIL PROTECTED] wrote: When I do string comparisons in perl the strings seem to ignore the embedded hyphens. I want to sort strings assuming the 'dictionary' order of the chars is ASCII order: hypen, 0-9, A-Z. It appears linux sort also has the problem (LC_ALL is blank). Any ideas? I want to av

Re: Interpolate variable in a __DATA__ block

2008-03-29 Thread John W. Krahn
Trudge wrote: I'm trying to get a script to interpolate variable values in a __DATA__ block if possible. perldoc -q "How can I expand variables in text strings" John -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts of tools at low cost and in short o

Re: Interpolate variable in a __DATA__ block

2008-03-29 Thread Gunnar Hjalmarsson
Trudge wrote: I'm trying to get a script to interpolate variable values in a __DATA__ block if possible. This is a kind of alternative to a full- blown template method. I'm not sure if I can even do what I want, hence my posting here. It can be done; see the FAQ entry perldoc -q "expand va

Re: Interpolate variable in a __DATA__ block

2008-03-29 Thread Rob Dixon
Trudge wrote: > Hi Trudge. I'm trying to get a script to interpolate variable values in a __DATA__ block if possible. This is a kind of alternative to a full- blown template method. I'm not sure if I can even do what I want, hence my posting here. No, you can't do that. But see below. The f

Re: sort without ignoring hyphens

2008-03-29 Thread Rob Dixon
[EMAIL PROTECTED] wrote: > When I do string comparisons in perl the strings seem to ignore the embedded hyphens. > I want to sort strings assuming the 'dictionary' order of the chars is ASCII order: hypen, 0-9, A-Z. > It appears linux sort also has the problem (LC_ALL is blank). > Any ideas?

Interpolate variable in a __DATA__ block

2008-03-29 Thread Trudge
I'm trying to get a script to interpolate variable values in a __DATA__ block if possible. This is a kind of alternative to a full- blown template method. I'm not sure if I can even do what I want, hence my posting here. The following code only goes so far. It correctly prints the value of $$datare

sort without ignoring hyphens

2008-03-29 Thread tc314
When I do string comparisons in perl the strings seem to ignore the embedded hyphens. I want to sort strings assuming the 'dictionary' order of the chars is ASCII order: hypen, 0-9, A-Z. It appears linux sort also has the problem (LC_ALL is blank). Any ideas? I want to avoid a brute force char by c

Re: diff says memory exhausted need help with perl

2008-03-29 Thread Rob Dixon
[EMAIL PROTECTED] wrote: > On Mar 28, 6:54 pm, [EMAIL PROTECTED] (Lawrence Statton) wrote: >> If you're using Gnu diff (i.e. the diff that comes with most Linuces) --speed-large-files might help you, without having to jump through a perl hoop. Problems: [snip] > 3) The heiristic approach is

Re: diff says memory exhausted need help with perl

2008-03-29 Thread Rob Dixon
[EMAIL PROTECTED] wrote: > On Mar 28, 6:54 pm, [EMAIL PROTECTED] (Lawrence Statton) wrote: If you're using Gnu diff (i.e. the diff that comes with most Linuces) --speed-large-files might help you, without having to jump through a perl hoop. --L Problems: 1) it runs out of memory 8Gig of files

Re: diff says memory exhausted need help with perl

2008-03-29 Thread tc314
On Mar 28, 6:54 pm, [EMAIL PROTECTED] (Lawrence Statton) wrote: > If you're using Gnu diff (i.e. the diff that comes with most Linuces) > --speed-large-files might help you, without having to jump through a > perl hoop. > > --L Problems: 1) it runs out of memory 8Gig of files with 2GB RAM 2) it as