>> Is there a generally accepted way to get the "base" of a filename, i.e.
>> strip off the multi-letter extension without using any modules? I've been
>> doing something like this:
>>
>> $fname = shift;
>> $fname =~ s/\.[^.]+$//;
>>
>> It feels a little hokey, though. Maybe it's just me.
>
here's something to get you started...
--
use Data::Dumper;
my %keep;
while() {
chomp;
if ($_ =~ s!(.*)/(.*)?!$1!g) {
$keep{$2} = $2;
print "$_\n";
}
else {
warn "$_ did not mattch our pattern";
}
}
warn Dumper(\%keep);
__
The scenario is like this
__DATA__
abc/edf/a
acb/ecf/b
ffabc/edf/e
dsa/bc/edf/xy
abc/edf/ghf/agg
And I want the output is like this
abc/edf
acb/ecf
ffabc/edf
dsa/bc/edf
abc/edf/ghf
Where it delete all the character starting from the last "/" and then it use the
pattern to
El día Sunday 27 July 2003 5:43 a Steve Grazzini mandó el siguiente correo:
> Have a look at perlsub -- the sections called "Private Variables with my()"
> and "Temporary Variables with local()" are the official description of the
> difference between these two.
>
> There's also a very good article
Pablo Fischer wrote at Sun, 27 Jul 2003 11:59:59 +:
> I have a Pretty class, with 15 methods (or more). I was reading a Perl
> Tutorial and read that I could create local variables. So In many of my
> methods Im using variables, but Im not declaring them like 'local $var', just
> like 'my $
On Sun, Jul 27, 2003 at 11:59:59AM +, Pablo Fischer wrote:
> I have a Pretty class, with 15 methods (or more). I was reading a Perl
> Tutorial and read that I could create local variables. So In many of my
> methods Im using variables, but Im not declaring them like 'local $var', just
> like
Hi!
I have a Pretty class, with 15 methods (or more). I was reading a Perl
Tutorial and read that I could create local variables. So In many of my
methods Im using variables, but Im not declaring them like 'local $var', just
like 'my $var'. So I changed a few variables from 'my' to 'local', and
[EMAIL PROTECTED] wrote:
>> Does anybody know if there is a way to improve NoteTab with this
>> feature, or if there is another editor very similar to NoteTab (i
>> mean appeareance, keys shortcuts, and all) but with this feature
>> included?
>
> This the best text editor I've ever used and I use
Pablo Fischer wrote at Sat, 26 Jul 2003 23:35:14 +:
> I need to evaluate a lot of conditionals, and of course the use of a lot of
> if's its not the 'right' way, so Im using something like this:
>
> CASE: {
> ($string == "match1") && do {
> actions..
> last CASE;
> };