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

[Omaha.pm] regex question



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