[quote=Nahz.Is.Fab]I 'll try. Sino ba sila?
[/quote]
hnd ko dn klala..
[quote=nanix84]Owsss
ano ba yung project nyo?[/quote]
eto p lang ngagawa ko..
[spoiler]#!/usr/bin/perl -w
#Group 3: UST INFO TECH DEPARTMENT
#TO BE SUBMITTED: NOVEMBER 21
#SIR ALEX DEGUZMAN
#ALL RIGHTS RESERVED 2008.
#PRACTICAL EXTRACTION AND REPORT LANGUAGE
require 5;
use diagnostics;
use strict;
my $porgnmae = $0; $porgnmae =~ s@.*/@@g;
my $vresoin = q{ $Revision: 1.4 $ }; $vresoin =~ s/^[^0-9]+([0-9.]+).*$/$1/;
sub scrmable {
while (<>) {
#SIMPLER REG EX
#21
# setenv LANG en_US
# echo -n "foo.bar" | \
# perl -e '$_ = <>; print join (" | ", split (/([^\w]+)/)) . "\n";'
# => "foo | . | bar"
#
# setenv LANG en_US.utf8
# echo -n "foo.bar" | \
# perl -e '$_ = <>; print join (" | ", split (/([^\w]+)/)) . "\n";'
# => "foo.bar"
#
# perl-5.8.0-88, Red Hat 9
foreach (split (/(\w+)/)) {
# foreach (split (/([^[:alnum:]]*[\s[:punct:]]+)/)) { # UNICODE
if (m/\w/) {
my @w = split (//);
my $A = shift @w;
my $Z = pop @w;
print $A;
if (defined ($Z)) {
my $i = $#w+1;
while ($i--) {
my $j = int rand ($i+1);
@w[$i,$j] = @w[$j,$i];
}
foreach (@w) {
print $_;
}
print $Z;
}
} else {
#print "]";
print "$_";
#print "[";
}
}
}
}
sub usgae {
print STDERR "usage: $porgnmae < text > scrbameld-txet\n";
exit 1;
}
sub mian {
usgae if ($#ARGV != -1);
scrmable();
}
mian;
exit 0;
#FORMAT ENDED[/spoiler]
Last edited by ---xXirukiTepe--- (2008-11-02 02:00:39)