split a word after n-letters (regexp?)

2004-06-10 Thread Stephan Hochhaus
A question I assume can be answered using regexp, unfortunately I am just starting my way into it. I have a bunch of words that I want to split, so that the first letters (minus n) and the last n-letters are seperated. n is user defined and therefore not static. How can I have Perl split at the

Re: starting perl

2004-05-02 Thread Stephan Hochhaus
Hi William and all, Most Useful Perl Modules -strict -warnings why is it everyone keeps suggesting use warnings when you could use diagnostics and get a whole lot of more info? I'd go for the diagnostics instead of the warnings module. Does this have any negative side effects (besides working to

Re: Why Perl

2004-04-28 Thread Stephan Hochhaus
Hi Brent and all, well wort it, I i was quite sad to see how PHP performed http://www.bagley.org/~doug/shootout/index2.shtml Hmm, the index.html pages states, that the last update to the results was performed in 2001. I might think PHP is by now a little more mature (=faster). I wouldn't be too

how to print modification date

2003-12-16 Thread Stephan Hochhaus
Hello list, I tried to dig my way through my newly acquired Perl ina nutshell and Learning Perl, but I couldn't find a satisfying solution to my problem: How can I print the last modification date of a file? It should work on different systems (*nix and OS X, Win32 is nice to have but not a mu

Re: Recommended simple Perl IDE/Editors ?

2003-12-15 Thread Stephan Hochhaus
Just wondering what IDE/editor folks use for their Perl work ? I am on OS X but I use a Java-based editor called jedit, which is available on W32 as well, I guess. http://www.jedit.org/ It supports syntax highlightning, plus it's Freeware and there are lots of nice add-ons! Stephan -- To unsub

Problems installing modules on OS X Panther

2003-12-09 Thread Stephan Hochhaus
Hello list! I am starting to dig deeper into Perl, after having successfully written my first working script :-) I am trying to install modules on my Mac OS X 10.3 Server machine, but I usually end up getting errors like this for the GD package (1) or this for the Bundle::LWP (2). I did inst

Re: first steps - read from files and make linklist

2003-12-03 Thread Stephan Hochhaus
Hello Bob, thanks a lot for your help! read the documentation and you'll see that the basename() function can remove extensions as well. Done that :-) The final app looks like this: #!/usr/bin/perl use strict; use diagnostics; use File::Basename; fileparse_set_fstype( 'Unix' ); #HTML blah blah

Re: first steps - read from files and make linklist

2003-12-03 Thread Stephan Hochhaus
The while() reads a line into the $_ variable, but you're not printing that; you're printing the filename itself. So you'll get one line of (the same) output for each line in the file. Ah, I should have seen that in the first place Then to show just the 'perl.txt' part, use: print basename($

first steps - read from files and make linklist

2003-12-03 Thread Stephan Hochhaus
Hello list, I am trying to write my very own first "useful" program and I am in need of some help. I do have a lot of ressources (a book by Andrew Johnson, the yellow book for dummies and lots of hypertexts) but I cannot seem to get things done the way they're supposed to work. I am completely