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

Re: Text manipulation with perl

by dimar (Curate)
on Sep 29, 2005 at 22:28 UTC ( [id://496270]=note: print w/replies, xml ) Need Help??


in reply to Text manipulation with perl

Well, since you said you are new to perl, the following gives you the benefit of the doubt, that you are at least willing to make a good faith effort to teach yourself, and not have the entire solution done for you by someone else.

This should give you a good head start. If you can dissect this and add the missing pieces yourself, it shows you're putting in some effort. If not, it smells like someone asking for free homework.

### begin_: init perl use strict; use warnings; use YAML; ### begin_: init vars my $sYAML; my $oData; my $iM; ### begin_: main $sYAML = join"",(<DATA>); $oData = YAML::Load($sYAML."\n\n"); $iM = ((scalar(@{$oData}))-1<29)?scalar(@{$oData})-1:29; print join "/\n",map{sprintf"'%s'",uc($_);}@{$oData}[0..$iM] +; ### begin_: end perl 1; __DATA__ - Some words here - some other words on this line - you get the idea

...

=oQDlNWYsBHI5JXZ2VGIulGIlJXYgQkUPxEIlhGdgY2bgMXZ5VGIlhGV

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2024-03-19 10:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found