[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Omaha.pm] regex question



i need to wake up.

just changing a scaler variable with a space to empty.

Thank you!



On Thu, Apr 17, 2014 at 3:46 PM, Jay Hannah <jay@jays.net> wrote:
On Apr 17, 2014, at 3:38 PM, Britt Gray <britt.c.gray@gmail.com> wrote:
> I have lost my mind and can’t figure out what the following line of code does.
>
> It is removing something from $adj.
>
> $adj =~ s/^ $//;

If $adj is ' ' then it will become ''.

^ means "starts with"
$ means "end with"

HTH,

j




_______________________________________________
Omaha-pm mailing list
Omaha-pm@pm.org
http://mail.pm.org/mailman/listinfo/omaha-pm