[21717] in Perl-Users-Digest
Perl-Users Digest, Issue: 3921 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Oct 5 18:06:19 2002
Date: Sat, 5 Oct 2002 15:05:10 -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 Sat, 5 Oct 2002 Volume: 10 Number: 3921
Today's topics:
converting a string into an array (Vivek)
Re: converting a string into an array <garry@ifr.zvolve.net>
Re: converting a string into an array <VES@VES.NET>
Re: converting a string into an array <s_grazzini@hotmail.com>
Re: converting a string into an array <garry@ifr.zvolve.net>
Re: Help please extracting data from a word document (pierrot)
how to make process shown as percentage <flying_dragon@china.com>
Re: how to make process shown as percentage (Walter Roberson)
Re: merging 2 strings (Jay Tilton)
Re: newbie question - perl vs ? <mike_constant@yahoo.com>
Re: newbie question - perl vs ? <tim@ironwork.com>
Re: newbie question - perl vs ? (Ken)
Re: newbie question - perl vs ? <tk@WINDOZEdigiserv.net>
Re: Script to Change Filename (Tad McClellan)
Re: Script to Change Filename <wsegrave@mindspring.com>
Re: Script to Change Filename <wsegrave@mindspring.com>
Truncated file write <mdudley@execonn.com>
Re: What can I do if I have not got chmop <bart.lateur@pandora.be>
Re: Which .exe generator? <kevin@vaildc.net>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 5 Oct 2002 13:55:45 -0700
From: vgtek@yahoo.com (Vivek)
Subject: converting a string into an array
Message-Id: <67965b1c.0210051255.18e64c4e@posting.google.com>
Hi,
I was wondering how do you turn a string into an array?
For example take a string $string="ABCDE" and make it an array so that
you can work with each character separately, so that
$s[0]=A....$s[1]=B....and so on.
Thanks. --Vivek
------------------------------
Date: Sat, 05 Oct 2002 21:18:33 GMT
From: Garry Williams <garry@ifr.zvolve.net>
Subject: Re: converting a string into an array
Message-Id: <slrnapuljb.oo9.garry@zfw.zvolve.net>
On 5 Oct 2002 13:55:45 -0700, Vivek <vgtek@yahoo.com> wrote:
> I was wondering how do you turn a string into an array? For example
> take a string $string="ABCDE" and make it an array so that you can
> work with each character separately, so that
> $s[0]=A....$s[1]=B....and so on.
Well, the answer to your question is to use the split() funtion.
But...
This is almost certainly an XY problem. "I want to do X, so how do I
do Y to get that done?"
It is extremely rare that you really need to do what you ask in Perl.
Regular expressions, index(), rindex(), etc. are probably what you
want. We don't know the X, so it's not clear what the right answer
is.
--
Garry Williams
------------------------------
Date: Sat, 05 Oct 2002 21:17:23 GMT
From: Vespasian <VES@VES.NET>
Subject: Re: converting a string into an array
Message-Id: <ZlafPd5tMNZ430Q0kLsLqzfuz+R0@4ax.com>
On 5 Oct 2002 13:55:45 -0700, vgtek@yahoo.com (Vivek) wrote:
>Hi,
>
>I was wondering how do you turn a string into an array?
>For example take a string $string="ABCDE" and make it an array so that
>you can work with each character separately, so that
>$s[0]=A....$s[1]=B....and so on.
>Thanks. --Vivek
@arr = split(//,$string);
------------------------------
Date: Sat, 05 Oct 2002 21:22:49 GMT
From: Steve Grazzini <s_grazzini@hotmail.com>
Subject: Re: converting a string into an array
Message-Id: <JKIn9.39247$YI.8519916@twister.nyc.rr.com>
Vivek <vgtek@yahoo.com> wrote:
> I was wondering how do you turn a string into an array?
> For example take a string $string="ABCDE" and make it an
> array
You can address the characters directly with substr():
my $string = 'ABCDE';
print substr($string,0,1); # A
substr($string,2,1,'c'); # now 'ABcDE'
substr($string,2,1) = 'c'; # same thing but slower
Or copy them to an array with:
my @chars = split //, $string;
But be aware that fiddling with "char arrays" isn't
Perl's strong suit.
--
Steve
perldoc -qa.j | perl -lpe '($_)=m("(.*)")'
------------------------------
Date: Sat, 05 Oct 2002 21:50:12 GMT
From: Garry Williams <garry@ifr.zvolve.net>
Subject: Re: converting a string into an array
Message-Id: <slrnapunem.oo9.garry@zfw.zvolve.net>
On Sat, 05 Oct 2002 21:22:49 GMT, Steve Grazzini
<s_grazzini@hotmail.com> wrote:
> But be aware that fiddling with "char arrays" isn't
> Perl's strong suit.
But the motivation for "fiddling with char arrays" is almost _always_
Perl's strong suit. You just don't fiddle with char arrays to get it
done in Perl.
That elusive X...
--
Garry Williams
------------------------------
Date: 5 Oct 2002 13:50:29 -0700
From: foutuguy@yahoo.fr (pierrot)
Subject: Re: Help please extracting data from a word document
Message-Id: <e6da095c.0210051250.1d0d360b@posting.google.com>
That works ! Thanks. In fact, i open first the word doc with notepad
(win xp/active perl), then i save it in txt file so that's more simple
and after, your code works. Now i have another question :
Now that i can extract the string next to "Display Coordinate System
Name:" on the same line, If I have :
3.1 Frame Defeinition
X Y Z
65.2 -103.8 204.9
3.2 another Frame that i do not want
X Y Z
33.3 89.56 -562.0
How should I proceed to extract the 3 numbers that are between the
paragrah 3.1 and 3.2 ??
I tried first that code even to catch the 6 of them, just to test if i
manage to catch the numbers but i did not catch anything:
if (/X Y Z\d+(.*)+\d+(.*)+\d+(.*)/) {
print "Extracted string: $1 $2 $3\n";
}
Any help is really appreciated. Thanks a lot in advance
Pierrot
"Tan Nguyen" <nospam@nospam.com> wrote in message news:<3d9e6110$1_2@nopics.sjc>...
> "Tan Nguyen" <nospam@nospam.com> wrote
> >
> > Do you have Perl installed on your system? What is the OS running on your
> > system? etc.
> >
> > The untested stuff below assumes that you are running Li/Unix with Perl
> > executable in /usr/bin/perl
> >
> > extract.pl:
> >
> > #!/usr/bin/perl -w
> > use strict;
> >
> > open(FH, $ARGV[0]) or die "cannot open $ARGV[0]: $!\n";
> > while (<FH>) {
> > chomp;
> > if (/Display Coordinate System Name:\s+(.*)/) {
> > print "Extracted string: $1\n";
> > }
> > }
> > close FH;
> >
> > On *nices, you can kick this script: at command prompt:
> > $ ./extract.pl input.doc
> >
> > This will print extracted strings to your screen. To redirect it to a
> file,
> > enter following:
> > $ ./extract.pl input.doc > output.txt
> >
> > On Windows, you do something similarly
> > C:/>perl extract.pl input.doc
> > or
> > C:/>perl extract.pl input.doc > output.txt
> >
> > PS: Pick up a Perl book.
> >
> Well, I didn't catch your line "Word Documents". This doesn't work with MS
> Word documents as they are compound files formatted in an object model
> (Structured Storage). You might want to either check out Perl::OLE to deal
> with MS structured storage or convert these MS Word documents to plain text
> files, then run them the aforementioned script.
------------------------------
Date: Sat, 05 Oct 2002 18:10:12 GMT
From: "James Q.L" <flying_dragon@china.com>
Subject: how to make process shown as percentage
Message-Id: <8WFn9.22415$Aiq1.6157@news04.bloor.is.net.cable.rogers.com>
hi,
let's say i am writting a big file to disk, how do i show the process as
percentage as it goes..
or just show consequently dots while it's processing ?
i know i can do this if i am doing something in a loop - just print one dot
each loop. but the writting file process is one operation..
this is for command line.
thanks
james
------------------------------
Date: 5 Oct 2002 18:21:19 GMT
From: roberson@ibd.nrc.ca (Walter Roberson)
Subject: Re: how to make process shown as percentage
Message-Id: <annaiv$8p4$1@canopus.cc.umanitoba.ca>
In article <8WFn9.22415$Aiq1.6157@news04.bloor.is.net.cable.rogers.com>,
James Q.L <flying_dragon@china.com> wrote:
:let's say i am writting a big file to disk, how do i show the process as
:percentage as it goes..
:or just show consequently dots while it's processing ?
:i know i can do this if i am doing something in a loop - just print one dot
:each loop. but the writting file process is one operation..
:this is for command line.
Depends which OS you are using.
If you are using a relatively reasonable OS, then you could fork
a process that spat out the dots at regular intervals; terminate the
process when the write is done. If if you have to do this a often,
leave it running and set a global flag telling it whether to print or not.
In more advanced OS's, you can ask the system to do asynchronous I/O:
if you were to do that, then you wouldn't need a separate process.
My understanding is that perl for DOS simulates forks and can only run
one thing at a time. I don't know if that is true for later Windows
versions.
--
This is not the same .sig the second time you read it.
------------------------------
Date: Sat, 05 Oct 2002 20:38:29 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: merging 2 strings
Message-Id: <3d9f43a5.604725919@news.erols.com>
angel@xev.net (Ken) wrote:
| I am currently encrypting user data using encryption that uses a key.
| However, I would like to use a unique key for each user's data. This
| is so the encrypted strings will be different for each user even if
| said user's have identical data.
mmmkay
| I have decided I can do this by using
| one static string as the key and then merging it with something unique
| to each user, such as the username or user number.
In other words, you want the keystring itself to be encrypted from some
piece of user-unique data. Sounds pretty iffy. Assuming the user-unique
element is publicly available, if somebody lays hands on the algorithm,
they can crank out the keystring for any and every user.
Why not let each user choose their own keystring?
| My problem is I
| have no idea how I can do this. I can't just use the dot operator to
| combine them. I need to sort of mix them together. Am I making any
| sense? If so, please help :)
Summing up,
1. Need to merge two strings, though "merge" hasn't been defined.
2. Concatenation is not acceptable, for unexplained reasons.
3. Need to "sort of mix them," for unknown values of "sort of" and "mix."
The problem statement needs refinement. It's too vague.
And it has nothing specifically to do with Perl.
------------------------------
Date: Sat, 5 Oct 2002 13:24:48 -0700
From: "Newbie" <mike_constant@yahoo.com>
Subject: Re: newbie question - perl vs ?
Message-Id: <3d9f4a09$1_2@nopics.sjc>
"Tim B." <tim@ironwork.com> wrote in message
> Having read and reread "Learning Perl", I'm starting to get into the
> book, "Programming Perl" and am having a tough time of it. Perl is so
> idiomatic that learning it is like learning English as an adult.
Don't be discouraged. I've been learning both Perlish and English as an
adult. Perl might appear to be wacky when you first start with it. It's
because the philosophy of Perl "There's more than one way". It gives the
user so much freedom that it might be perceived as a complex language to
learn at first. However, once you get used to it, you'll enjoy the freedom
and flexibility it gives you. If you're familiar with any programming
languages and the Unix environment, you will not find it too hard to learn
after a while. In fact, I didn't know much about Unix, and Perl has educated
me quite a bit about this platform.
Personally, I've learned Perl mostly through practical exercises (work),
online documentation, and newsgroups. I've never owned a Perl book as I find
online materials quite sufficient. You should start with small, simple
scripts and work towards bigger challenges. You'll be surprised that you can
do so much with Perl before you know it.
http://learn.perl.org (Learning Perl starting with A)
http://www.perl.com (Once in a while, there's a good article for raising
your Perl knowledge)
http://perl.apache.org (Stas Beckman has loads of tricks to optimize Perl
code)
------------------------------
Date: Sat, 05 Oct 2002 21:02:03 GMT
From: Tim B. <tim@ironwork.com>
Subject: Re: newbie question - perl vs ?
Message-Id: <4ckupugn1h0ak7l2ap2mju48h21d537tqk@4ax.com>
On Sat, 5 Oct 2002 15:06:08 +0000 (UTC), mjd@plover.com (Mark Jason
Dominus) wrote:
<snip>
>The puzzle I have is that you say you have read and reread "Learning
>Perl". If that's true, I don't understand why you feel your Perl
>knowledge is lacking. LP would seem to have enough information in it
>to get you well started writing almost anything; then you would need
>to turn to the camel book only ocasionally, for reference, and to pick
>up new features as needed. But it almost sounds as if you are trying
>to swallow the camel whole before you ever write any programs. Is
>that true? Did you try doing the exerises in LP?
I confess that:
a. I did a few exercises in "Learning Perl" but not all of them by
any means.
b. I am trying to learn everything in one big gulp.
I am trying to do all this at home (I am neither in school, nor do I
have a Unix/Linux job), so I am unable to call on informed others
about what is important and what is not. Maybe I can use this group
for that. Is that reasonable to expect?
One thing, though, about choosing only a part of Perl to learn and
leaving the rest for another time (life?) -- how do you read other
people's Perl scripts that way? Slow and sloggishly, I guess.
Anyway, thanks for the response. More later.
Tim B.
------------------------------
Date: 5 Oct 2002 14:02:28 -0700
From: angel@xev.net (Ken)
Subject: Re: newbie question - perl vs ?
Message-Id: <fafcc419.0210051302.2767691c@posting.google.com>
The best way to learn perl is to program in Perl. Studying other
people's code is also very helpful. Download some perl scripts and try
making some changes to them. Learning Perl by simply reading books
without doing any actual coding is going to be difficult at best. Just
try writing or editing code with your Perl books in front of you. The
more you program the less you'll find yourself flipping through your
references.
A great place to find scripts is at
http://cgi.resourceindex.com/Programs_and_Scripts/Perl/
Tim B. <tim@ironwork.com> wrote in message news:<omttpu46q8fto14mml32e7qnqtf8cg1j46@4ax.com>...
> Having read and reread "Learning Perl", I'm starting to get into the
> book, "Programming Perl" and am having a tough time of it. Perl is so
> idiomatic that learning it is like learning English as an adult. One
> is faced with mountains of context issues, stylistic variations, all
> of which can be used to do the same thing, and a plethora of symbols,
> many of which are to be understood differently when used in different
> ways. Although similar variations exist in other languages, the
> extent of this situation is much greater in Perl than in any other
> language I have ever seen.
>
> On the other hand, I am commited to working in a Linux/Open source
> environment and need the extensive capabilities that I have been told
> Perl offers. I'm just afraid I'll be old and crippled (mentally), by
> the time I get proficient enough with Perl to use it productively. I
> want to have as broad a base of understanding in working in the Linux
> environment as possible, including networking, website development,
> routine maintenance of a desktop and application programming.
>
> Are there any viable language options to Perl? I know that I could go
> to PHP for website/database development, but I've heard that PHP is
> only a subset of Perl, and I will ultimately miss out on a lot and
> have to learn Perl in the long run, anyway. C/C++ can do anything,
> but it takes about 10 times as long to program in those languages.
>
> On the other hand, maybe I need a good online couse in Perl. Does
> anyone know where I can fine a good course that will take me from Perl
> A to Perl Z??
>
> ANY HELP WILL BE GREATLY APPRECIATED!!!
>
> Tim B.
------------------------------
Date: Sat, 05 Oct 2002 21:15:48 GMT
From: tk <tk@WINDOZEdigiserv.net>
Subject: Re: newbie question - perl vs ?
Message-Id: <a4lupugecjl2rb74bkqmss2ocq6vva615n@4ax.com>
In a fit of excitement on Sat, 05 Oct 2002 21:02:03 GMT, Tim B.
<tim@ironwork.com> managed to scribble:
| On Sat, 5 Oct 2002 15:06:08 +0000 (UTC), mjd@plover.com (Mark Jason
| Dominus) wrote:
|
| <snip>
|
| >The puzzle I have is that you say you have read and reread "Learning
| >Perl". If that's true, I don't understand why you feel your Perl
| >knowledge is lacking. LP would seem to have enough information in it
| >to get you well started writing almost anything; then you would need
| >to turn to the camel book only ocasionally, for reference, and to pick
| >up new features as needed. But it almost sounds as if you are trying
| >to swallow the camel whole before you ever write any programs. Is
| >that true? Did you try doing the exerises in LP?
|
| I confess that:
| a. I did a few exercises in "Learning Perl" but not all of them by
| any means.
| b. I am trying to learn everything in one big gulp.
|
| I am trying to do all this at home (I am neither in school, nor do I
| have a Unix/Linux job), so I am unable to call on informed others
| about what is important and what is not. Maybe I can use this group
| for that. Is that reasonable to expect?
|
| One thing, though, about choosing only a part of Perl to learn and
| leaving the rest for another time (life?) -- how do you read other
| people's Perl scripts that way? Slow and sloggishly, I guess.
|
| Anyway, thanks for the response. More later.
|
| Tim B.
My 2pence worth...
I originally started learning Perl for one reason.. I wanted to code me
own guestbook for a site I was writing (about 3 years ago). As you can
expect, it was very simple, but it worked. As others have stated,
learning from others source is a big step in the right direction IMHO,
it's how I've learnt most of any language I know (I'm not an expert in
any, but know a fair amount of a fair few languages.. enough to get me
by for whatever I need). After the guestbook came a very very simple
flatfile forum, no registrations or anything, purely post n display.
I switched to PHP for web development as I _personally_ found it more
flexible for that area. As for anything else, Perl all the way. I
develop most of my stuff on FreeBSD and have only ever written one bash
script, all other sysadmin code is always perl. I'm currently building
an IRC bot for my server (currently ~1100 lines) and growing. Within the
3 years or there abouts, learning bits of Perl on n off for various
reasons, I've learnt a fair bit.. considering a lot was "off" more than
"on".
I think once you get "stuck in" and rolling slowly, you'll grow to love
it, and find various ways that are different to ways you see in books,
references, and others posts here, you'll develop your own style. Mine
works for me, but I'm sure 60% at least on this NG alone could convert
my code into something smaller, faster maybe.. or just differently.. but
the end results would be the same.
As for your last comment.. you'll read snippets of others code, to see
how a particular situation was dealt with by that coder, and you can
then implement that into your own development. If you were looking for a
simple string replace, you wouldn't need to read the source part
regarding hashes and keys for example. I'll normally search google or
the likes for something I'm after, look at various pieces of code, and
try n work out the best way for _me_ to implement the same.
Anyways.. happy hackin' =)
Regards,
tk
--
+--------------------------+
| digiServ Network |
| Web solutions |
| http://www.digiserv.net/ |
+--------------------------+
Remove WINDOZE to reply
------------------------------
Date: Sat, 5 Oct 2002 13:28:34 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Script to Change Filename
Message-Id: <slrnapubqi.2gd.tadmc@magna.augustmail.com>
Tad McClellan <tadmc@augustmail.com> wrote:
> s/^(\d{3,8})([a-zA-Z]\.dat)$/${1}-${2}/;
^ ^ ^ ^
^ ^ ^ ^
> There is no advantage. It is spurious.
As are the unneeded curly brackets there.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 5 Oct 2002 14:06:14 -0500
From: "William Alexander Segraves" <wsegrave@mindspring.com>
Subject: Re: Script to Change Filename
Message-Id: <annei3$ghe$1@slb6.atl.mindspring.net>
"Tad McClellan" <tadmc@augustmail.com> wrote in message
news:slrnapubqi.2gd.tadmc@magna.augustmail.com...
<snip>
> > s/^(\d{3,8})([a-zA-Z]\.dat)$/${1}-${2}/;
> ^ ^ ^ ^
> ^ ^ ^ ^
>
> > There is no advantage. It is spurious.
>
>
> As are the unneeded curly brackets there.
True, indeed. Thanks. It seems TIMTOWDI is still alive. ;-)
I believe we've beaten the OP's revised problem to death now. Your version
of the regex, i.e.,
s/^(\d{3,8})([a-zA-Z]\.dat)$/$1-$2/; # Tad McClellan
certainly does what the OP requested, to your credit, not mine.
Please see my followup on your previous for more on (?: issues raised by
Harold. If you think it best, we could even move that discussion to another
thread.
Cheers.
Bill Segraves
------------------------------
Date: Sat, 5 Oct 2002 14:32:10 -0500
From: "William Alexander Segraves" <wsegrave@mindspring.com>
Subject: Re: Script to Change Filename
Message-Id: <anneng$jub$1@slb7.atl.mindspring.net>
"Tad McClellan" <tadmc@augustmail.com> wrote in message
news:slrnapu6qs.20d.tadmc@magna.augustmail.com...
<snip>
> (?: ) gives you grouping but does not give you memory, leaving
> the counts unsullied.
>
>
> (and it is not "?:" that we are talking about here. The token
> is all three characters "(?:" together.
I see. Thanks, Tad.
<remainder of explanations noted and saved for future reference, with
thanks>
BTW, I'm persuaded by your able commentary that the use of (?: is not needed
in the context of the solutions to the OP's original question, as modified
later by the OP.
Please bear with me. I'm trying to learn why (?: would have been used at all
by David Britten.
So, please consider:
A:
s/((?:\d)+)([a-zA-Z]\.dat)$/$1-$2/;
#regex from David Britten,
# with Tad's suggested $ anchor for .dat end of the filename,
# and Tad's suggested deletion of curly brackets
Q:
What is a regex that will convert a filename composed of any number of
characters and numbers ending in at least one letter, followed by any number
of numbers and any single letter, followed by the filename extension .dat,
inserting a dash between all of the the rightmost numbers and the single
letter?
Here's a little script that tests it:
#!perl -w
# filedasher_v2g.pl - adds dashes into filenames at right end,
# in a particular fashion
# e.g., 12345a.dat becomes 12345-a.dat
use strict;
my @filenames = ("ABCabcdefgzz0123456789a1234567890b2345678901c.dat",
# I commented out the other filenames, leaving space here for others
);
foreach (@filenames){
# let me know which filename is being processed
print "Passing filename $_ to regex\n";
s/((?:\d)+)([a-zA-Z]\.dat)$/$1-$2/;
#regex from David Britten,
# $ anchor added & curly brackets deleted per Tad
# check to see effects of ((?: \d)+) above
print '$1 = ', $1, ', $2 = ', $2, "\n";
print $_, "\n";
}
Here's the output:
Passing filename ABCabcdefgzz0123456789a1234567890b2345678901c.dat to regex
$1 = 2345678901, $2 = c.dat
ABCabcdefgzz0123456789a1234567890b2345678901-c.dat
It appears to me that (?: is exhibiting the behaviour suggested (to me) by
the Associativity-Operators table shown in "Operators", p. 77, of the
previously cited Camel Book, 2nd. ed, i.e., the use of (?: appears to force
the match to the right.
Is this a correct interpretation? Is there a better way to match as many
numbers as possible to the left of any_single_letter.dat, stopping the match
at the first encountered letter, but retaining all of the characters to the
left of the last matched consecutive number?
Cheers.
Bill Segraves
------------------------------
Date: Sat, 05 Oct 2002 16:37:03 -0400
From: Marshall Dudley <mdudley@execonn.com>
Subject: Truncated file write
Message-Id: <3D9F4D6F.BFBA7F65@execonn.com>
I have an application where a data file may get read quite often, but it
only gets written by the manager, which has only one person ever in it
at a time. I am therefore not locking the file, since a lock does not
lock reads or appends, and there is no possibility of two writes at the
same time.
There is a data file which is either appended to when an item is added,
or the file is read in, one line changes and written back if an item is
edited. I have never had a problem with this for over 18 months and
tens of thousands of updates. But this morning during what a customer
said was an addition (that would have been an append operation), the
file got truncated, losing several hundred lines off of about 3500
lines. Also the last line was truncated, so it appears to have aborted
right in the middle of writing a line.
How could this happen? And what can be done to prevent it from happening
again. The customer was quite upset, losing about a month's worth of
work. Fortunately we had done a complete backup last night, so we were
able to restore him to what he had last night anyway.
The only thing I can think of is that the process got killed during the
write. The customer claims he did not hit stop during an update though
when I asked him. Would a killed process actually stop a write in the
middle of a line like that? Of am I looking in the wrong place. I also
checked and found no core dumps.
Any ideas?
Thanks,
Marshall
------------------------------
Date: Sat, 05 Oct 2002 19:20:34 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: What can I do if I have not got chmop
Message-Id: <creupu8j9ip2752lbsbc4igmq0oo72q3qp@4ax.com>
Jürgen Exner wrote:
>Nigel Goldsmith wrote:
>> Wrote a little bit of code on perl 5 then took it on to an old Sun
>> box and it did not like chomp, are there any alternatives? I am sure
>> there are let the code flow!!!
>
>Well, you could use chop instead, but it's not as convenient because it will
>chop-chop any character, not just newlines.
This will likely do what is wanted:
s/\n$//;
--
Bart.
------------------------------
Date: Sat, 05 Oct 2002 15:23:27 -0400
From: Kevin Michael Vail <kevin@vaildc.net>
Subject: Re: Which .exe generator?
Message-Id: <kevin-59821D.15232705102002@vienna7.his.com>
In article <anbr8p$f90$1@newshost.mot.com>,
"Richard S Beckett" <spikey-wan@bigfoot.com> wrote:
> It seems that there are 2 main contenders, Active State's Dev kit, and
> perl2exe.
>
> []
>
> Generally I want to be able to create self contained programmes that will
> run on a variety of operating systems, but would like to be able to generate
> them all from the same scripts that I have written on my PC, on W2K.
I've used Perl2Exe for quite a lot of internal utilities at work, and
had no problems with it. Most of the programs I'm producing use Tk, and
it seems to handle this fine.
> Also, ease of getting updates would be useful, as I'm sure my company will
> be upgrading us all to XP pro or similar at some point, so something that I
> can get for a one off payment with free updates would save me a lot of
> trouble.
Perl2Exe gives you free minor upgrades for a year, then you pay
basically half price and get another year of free minor upgrades.
--
Kevin Michael Vail | Dogbert: That's circular reasoning.
kevin@vaildc.net | Dilbert: I prefer to think of it as no loose ends.
http://www.vaildc.net/kevin/
------------------------------
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.
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 3921
***************************************