#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    Riverside, CA
    Posts
    63
    Rep Power
    14
    How do you take a characters off the end of a varible or specify the size of a variable to be a certain size.
  2. #2
  3. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Location
    Ft. Lauderdale, FL, US
    Posts
    29
    Rep Power
    0
    you can use:

    $var =~ s/^(.{5}).*/$1/;

    which will truncate your variable to 5 characters.

    or, it should, anyways.

IMN logo majestic logo threadwatch logo seochat tools logo