sawyl: (Default)
[personal profile] sawyl

I've moved back from Python to Perl and I've finally noticed something:

No matter how clean I attempt to make my Perl code, it always looks like it's been beaten with an ugly stick.

Maybe it's just me. Maybe I can't code.

Date: 2005-05-16 08:36 pm (UTC)
From: [identity profile] the-tiddler.livejournal.com
I had a nightmare with a simple perl script today...

I had several lines like :

123 456 Hello
34 27 Goodbye
...

I was looping over each line (so in $_) and was trying to split into three variables, so :

my ($num1, $num2, $string) = split(/[ ]+/);

and what was coming out ?
.. everything was in $num1 ... I was pulling my hair out ..

I fixed (after a while) by removing the my( ) bollocks...

I still have no idea what was going on ... so "my" can go shove.

A bad day.

Date: 2005-05-16 09:51 pm (UTC)
From: [identity profile] sawyl.livejournal.com
Sounds weird. You weren't setting up the variable with my and then trying to read it out side the current block were you?

Speaking of programming problems, I had a total case of the horrors trying to explain to a user why Tokyo thought that the compiler was reording his code in a totally brain dead way. The PSR reply was like a Taoist riddle or a one of the Escher illusions - thinking about it brought out something that was actually there all along, but as soon as my attention wandered, it was gone again...

Profile

sawyl: (Default)
sawyl

August 2018

S M T W T F S
   123 4
5 6 7 8910 11
12131415161718
192021222324 25
262728293031 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 4th, 2026 05:08 pm
Powered by Dreamwidth Studios