in reply to manipulating data array into returning nice message

It looks like the meat of your question could be answered thus:

use warnings; use strict; my @deleted = ('Entry 1', 'Entry 2', 'Entry 3'); my $str = "Deleted forum"; @deleted > 1 ? ($str .= 's: ') : ($str .= ': '); $str .= join ', ', @deleted; print $str;

Prints:

Deleted forums: Entry 1, Entry 2, Entry 3

DWIM is Perl's answer to Gödel

Replies are listed 'Best First'.
Re^2: manipulating data array into returning nice message
by stonecolddevin (Parson) on Feb 21, 2006 at 02:50 UTC
    GrandFather nailed it, however i'm having trouble pushing ALL the numbers into the array, it seems like it's just counting the number of elements in the array
    meh.