Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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

by projekt21 (Friar)
on Jan 17, 2002 at 16:23 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://139487]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-25 22:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found