$filename =~ s/^.*[\/\\]([^\/\\]+)$/$1/;

Ameesh

Lifer
Apr 3, 2001
23,686
1
0
rolleye.gif


god i hate perl coders
 

The Dancing Peacock

Diamond Member
Dec 22, 1999
3,385
0
0
that's all I did today and yesterday was code in perl, I almost PM'ed you with a question, but I asked a guy at work and I got it
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
$filename =~ s/^.*[\/\\]([^\/\\]+)$/$1/;

filename = re.sub(r'^(.*)[/\]([^/\]+)$', r'\1', filename)

python > perl :D
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
Originally posted by: BingBongWongFooey
$filename =~ s/^.*[\/\\]([^\/\\]+)$/$1/;

filename = re.sub(r'^(.*)[/\]([^/\]+)$', r'\1', filename)

python > perl :D

I fail to see how a different syntax makes it better :p
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
Originally posted by: notfred
Originally posted by: BingBongWongFooey
$filename =~ s/^.*[\/\\]([^\/\\]+)$/$1/;

filename = re.sub(r'^(.*)[/\]([^/\]+)$', r'\1', filename)

python > perl :D

I fail to see how a different syntax makes it better :p

that wasnt an example of how its better, was just a translation for the heck of it.

i'm just spewing hot air anyways, i never learned much perl, but from what i did learn i didnt like it. sloppy and fidgety :p

now python...python is perfect ;)

actually i've been learning it the past week or two and it is very nice...
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
Originally posted by: BingBongWongFooey
Originally posted by: notfred
Originally posted by: BingBongWongFooey
$filename =~ s/^.*[\/\\]([^\/\\]+)$/$1/;

filename = re.sub(r'^(.*)[/\]([^/\]+)$', r'\1', filename)

python > perl :D

I fail to see how a different syntax makes it better :p

that wasnt an example of how its better, was just a translation for the heck of it.

i'm just spewing hot air anyways, i never learned much perl, but from what i did learn i didnt like it. sloppy and fidgety :p

now python...python is perfect ;)

actually i've been learning it the past week or two and it is very nice...

Perl is faster :)
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
Originally posted by: notfred
Originally posted by: BingBongWongFooey
Originally posted by: notfred
Originally posted by: BingBongWongFooey
$filename =~ s/^.*[\/\\]([^\/\\]+)$/$1/;

filename = re.sub(r'^(.*)[/\]([^/\]+)$', r'\1', filename)

python > perl :D

I fail to see how a different syntax makes it better :p

that wasnt an example of how its better, was just a translation for the heck of it.

i'm just spewing hot air anyways, i never learned much perl, but from what i did learn i didnt like it. sloppy and fidgety :p

now python...python is perfect ;)

actually i've been learning it the past week or two and it is very nice...

Perl is faster :)

faster to a migrane :D
 

schizoid

Banned
May 27, 2000
2,207
1
0
I'm working on a freeware port of Windows for Workgroups on the C64, using the best language ever:


Prolog
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
Originally posted by: BingBongWongFooey
Originally posted by: notfred
Originally posted by: BingBongWongFooey
Originally posted by: notfred
Originally posted by: BingBongWongFooey
$filename =~ s/^.*[\/\\]([^\/\\]+)$/$1/;

filename = re.sub(r'^(.*)[/\]([^/\]+)$', r'\1', filename)

python > perl :D

I fail to see how a different syntax makes it better :p

that wasnt an example of how its better, was just a translation for the heck of it.

i'm just spewing hot air anyways, i never learned much perl, but from what i did learn i didnt like it. sloppy and fidgety :p

now python...python is perfect ;)

actually i've been learning it the past week or two and it is very nice...

Perl is faster :)

faster to a migrane :D

It's only confusing to those that don't understand it :p
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
Originally posted by: notfred
Originally posted by: BingBongWongFooey
Originally posted by: notfred
Originally posted by: BingBongWongFooey
Originally posted by: notfred
Originally posted by: BingBongWongFooey
$filename =~ s/^.*[\/\\]([^\/\\]+)$/$1/;

filename = re.sub(r'^(.*)[/\]([^/\]+)$', r'\1', filename)

python > perl :D

I fail to see how a different syntax makes it better :p

that wasnt an example of how its better, was just a translation for the heck of it.

i'm just spewing hot air anyways, i never learned much perl, but from what i did learn i didnt like it. sloppy and fidgety :p

now python...python is perfect ;)

actually i've been learning it the past week or two and it is very nice...

Perl is faster :)

faster to a migrane :D

It's only confusing to those that don't understand it :p

s/confusing/ugly :D:p
 

schizoid

Banned
May 27, 2000
2,207
1
0
I had to program an interpretor for the Lamda calculus (functionally the same as turing machines...i.e. the other half of the church-turing thesis) in ML.

For those of you who don't know, ML is the programming language for annoying academic types who love axiomatic semantics and who don't get laid enough.

But none of these languages hold a candle to Prolog.

And language that talks back to you just rules.

No.

That would always crack me up. I'd be working on a Prolog assignment, and it would say "No" and I'd just start screaming at the computer, like, "Yes! HOW DARE YOU TALK TO ME LIKE THAT!"

Ok, someone do this DOE fellowship for me. Thanks.
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
Originally posted by: schizoid
I had to program an interpretor for the Lamda calculus (functionally the same as turing machines...i.e. the other half of the church-turing thesis) in ML.

For those of you who don't know, ML is the programming language for annoying academic types who love axiomatic semantics and who don't get laid enough.

But none of these languages hold a candle to Prolog.

And language that talks back to you just rules.

No.

That would always crack me up. I'd be working on a Prolog assignment, and it would say "No" and I'd just start screaming at the computer, like, "Yes! HOW DARE YOU TALK TO ME LIKE THAT!"

Ok, someone do this DOE fellowship for me. Thanks.

haha, wow man, you are in too deep... :D

although there is some appeal to "No." vs. "Unhandled exception argument 6 on line 32: variable undefined blah blah"
 

schizoid

Banned
May 27, 2000
2,207
1
0
Originally posted by: BingBongWongFooey
Originally posted by: schizoid
I had to program an interpretor for the Lamda calculus (functionally the same as turing machines...i.e. the other half of the church-turing thesis) in ML.

For those of you who don't know, ML is the programming language for annoying academic types who love axiomatic semantics and who don't get laid enough.

But none of these languages hold a candle to Prolog.

And language that talks back to you just rules.

No.

That would always crack me up. I'd be working on a Prolog assignment, and it would say "No" and I'd just start screaming at the computer, like, "Yes! HOW DARE YOU TALK TO ME LIKE THAT!"

Ok, someone do this DOE fellowship for me. Thanks.

haha, wow man, you are in too deep... :D

although there is some appeal to "No." vs. "Unhandled exception argument 6 on line 32: variable undefined blah blah"

Yeah.

I'm a little wacky like that.

I still type "echo poop" at unix prompts because I think it's funny.

I hate ML.

And fellowship applications.

And the lambda calculus.

If I ever hear someone say "y-combinator" again I am going to go on a three state killing spree.

And I don't think "Curry" should be a function one can perform. I think it should be a tasty Thai/Indian style of cooking that makes your nose run.

Or a power forward for the Bulls.

Or something.

Help.


 

schizoid

Banned
May 27, 2000
2,207
1
0
Originally posted by: notfred
I hate curry. It's yellow and tastes bad. Like urine.

Dude, I don't know where you've been getting your urine, but it's hella good!

Oh...

I mean curry. Curry is hella good.

Urine is only sorta good, if it's prepared right.

 

notfred

Lifer
Feb 12, 2001
38,241
4
0
Originally posted by: BingBongWongFooey
I still type "echo poop" at unix prompts because I think it's funny.

:D<------------

stupid website.

"sorry, no funky punctuation, too many people try and hack me with backticks and pipes and whatnot."
 

schizoid

Banned
May 27, 2000
2,207
1
0
Originally posted by: BingBongWongFooey
I still type "echo poop" at unix prompts because I think it's funny.

:D<------------

Heh.

When you type in "poop" there, it comes out...well...it says poop! But it's all big and stuff.

I'm sure it'd mess up the spacing if I cut and pasted, but you can use your imagination.