Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: about () in the second,third etc data

by projekt21 (Friar)
on Jan 17, 2002 at 16:23 UTC ( #139487=note: print w/replies, xml ) Need Help??


in reply to about () in the second,third etc data

If I understood your question correctly, then try something like:

my @a = $de->text(); print OUT shift @a, "\n", join("\n", map { "($_)" } @a);

The shift returns (and removes) the first element, while the map adds those brackets. This is just one possible solution. You also may have a look at printf. Hope this helps.

alex pleiner <alex@zeitform.de>
zeitform Internet Dienste

Replies are listed 'Best First'.
Re: Re: about () in the second,third etc data
by demerphq (Chancellor) on Jan 17, 2002 at 16:31 UTC
    Assuming theres always more than element then the following allows you to lose the map
    my @a = $de->text(); print OUT shift @a, "\n(", join(")\n(", @a),")\n";
    ;-)

    Yves / DeMerphq
    --
    When to use Prototypes?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://139487]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2021-04-15 03:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?