Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Text manipulation with perl

by dimar (Curate)
on Sep 29, 2005 at 22:28 UTC ( #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


Comment on Re: Text manipulation with perl
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2014-08-29 18:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (286 votes), past polls