Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

footpad's scratchpad

by footpad (Abbot)
on Jun 02, 2004 at 02:08 UTC ( [id://359005]=scratchpad: print w/replies, xml ) Need Help??

Next up: More new prefix tags...

Current task list:

  1. Repair the perldoc:// tag
  2. Repair the jargon:// tag
  3. Streamline pad:// so that [pad://] returns "my pad" for the posting monk.
  4. Investigate lucky:// and see if [lucky://try|this] is broken or not.
  5. Investigate feasibility for section specific search links, e.g. user://, sopw://, med://, q&a://, and so on.
  6. Try to streamline HTML.pm, per tye's suggestion.
  7. Update doccy.
  8. Under consideration: add a /think chatter tag?

Also, /me wonders what people think of these as new link tags:

  • ora:// to search O'Reilly's website.
  • rls:// to search merlyn's column archives.
  • imdb:// to search the Internet Movie database.


That's the end of the current content. Archives are below...

This:
#!/usr/bin/perl -w use strict; my $sentence = "I am Sam. Sam I am."; my @words = ( $sentence =~ /(\w+|\s+|[[:punct:]]+)/g ); my $element; my $count = 0; foreach $element (grep { !/\s/ } @words) { print "Element ", sprintf( "%02d", $count++ ), ": $element\n"; }

works as desired. It yields:

Element 00: I Element 01: am Element 02: Sam Element 03: . Element 04: Sam Element 05: I Element 06: am Element 07: .
(thanks, tye and zaxo)
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-04-20 02:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found