Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

allolex's scratchpad

by allolex (Curate)
on Jun 01, 2004 at 20:30 UTC ( #358546=scratchpad: print w/ replies, xml ) Need Help??

#!/usr/bin/perl my $obj = new MyObject ('GB-LAQ-05-00017'); print $obj."\n"; package MyObject; sub new { my($pkg, $string) = @_; bless { _string => $string, }, $pkg; } sub SCALAR { $_[0]->{_string}; }

Filename conversion - make acronym

#!/usr/bin/perl # Converts a long file name with spaces or underscores # to an abbreviated format. use strict; my $filename = 'This is my word document there are many like it but th +is one is mine.doc'; my @array = split /[ \._]/, $filename; my $ext = pop @array; print map m/^([\w])/, @array; print '.' . $ext . "\n";
:wq
Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (13)
As of 2014-12-18 13:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (51 votes), past polls