Hi all,
Just sat done and put together my FIRST MODULE!!!!
I went through an edited/modifyed text::parsewords and
after lots of testing, editing and playing around
with...I got it to work! I didn't realize it could be
THIS easy! I have been playing around with h2xs and
getting really confused. If I understand this, the
*.pm file is standalone and will work on pretty much
any platform?? So if I write another one completely
from scratch using this rough template it is
effectively a perl module that I can distribute??
Surely it can't be THAT easy??
I'm missing something I'm sure of it! :) Any
thoughts...
Ben
package Test::Test;
use vars qw($VERSION @ISA @EXPORT);
$VERSION = "1.00";
require 5.000;
use Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(Test);
@EXPORT_OK = qw();
sub Test
{
my (@parsewords) = @_;
foreach $line (@parsewords)
{
(@linebreakdown)=split(/,/,$line);
}
return(@linebreakdown);
}
1;
__END__
=head1 NAME
Test::Test - parse text into an array
=head1 SYNOPSIS
use Test::Test;
@teststring = Test("...sometext here delimited by a
comma...");
=head1 DESCRIPTION
=head1 EXAMPLES
The sample program:
use Test::Test;
@ex=Test("Q,Path,Path2,File");
print $ex[1];
produces:
c:\>path
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>