Nicola,
there is another loop. The whole construction looks like this:
for(@file1) {
$_ =~ s/[\r]|[\n]//;#remove CR and DOS CR
$_ =~ s/\"//g; #remove quotes
next if ($_ =~ /;;;|DATUM|GESAMT|ANZAHL/);
@raw=split /;/,$_;
if ( $raw[3]
Hi all,
a while ago I wrote a little unit conversion I am quite happy with. Just out
of interest: is there a more elegant way to do it? And maybe even more
interesting: what approach should I take to implement the back conversion?
Here is my code:
#! /usr/gnu/bin/perl -w
Thanks to all for your ideas,
> ~C wrote:
>Hope this helps - out of interest, what sort of UNIX command _needs_ a
>list like that instead of an explicit one?
I have to apologize for my unclear formulation. It is indeed not a UNIX
command but a UNIX programm being controlled via command line. My
Hello All,
I want to transform a sorted list into a compact list (if this is the
correct term).
e.g. my list is
9,11,12,13,14,23,25,26,27,50and want to have something like
9,11-14,23,25-27,50 (to pass on to a unix-command).
Is there any module or function I can use to summariz
Since emacs is being used why not using emacs' buildin serep function?
Macro:
M-< ;; beginning-of-buffer
M-% ;; query-replace
C-q ;; quoted-insert
C-m ;; newline
2*RET ;; newline
!
Hello,
I'd like to match numbers and add them to an array if the array does not
contain the number.
let's assume $part[1] can hold the values in consecutive order e.g. 5, 1005,
5, 2000 then
next if (grep /$part[1]/, @tnumlist);
push @tnumlist,$part[1];
would yield @tnumlist