in reply to getting a filename

The problem lies in this line: ($im,$from) = split(/im/, $message);

Since you're splitting on 'im', and 'ultimatedbz' has 'im' in it, it's correctly returning 'ult' (and discarding 'atedbz')

Replies are listed 'Best First'.
Re: Re: getting a filename
by perleager (Pilgrim) on Mar 23, 2001 at 00:53 UTC
    Oooh. I c.

    Is there any way to fix this?

      instead of using split, use a regex:

      if ( my ($from) = /^im(.*)/ ) { # do stuff }

      Philosophy can be made out of anything. Or less -- Jerry A. Fodor

      I'd recommend changing your naming scheme for your files, for starters, to something that people won't be naming themselves.