develooper Front page | perl.beginners | Postings from March 2002

remove a char

Thread Next
From:
Michael Gargiullo
Date:
March 28, 2002 22:27
Subject:
remove a char
Message ID:
NGBBJEADBDIGMPLAMOCNAECMCCAA.gargiullo@comcast.net
In an array say @randomWord

The second position could contain one of a thousand words, but the words all
end with a comma.  How can I strip that comma?

I've tried using:

$_=$randomWord[1];
/(.*.),/;
$randomWord[1] = $_;

But this is not working, any sugestions?

-Mike


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About