[Omaha.pm] regex question

Jay Hannah jay at jays.net
Thu Apr 17 13:46:03 PDT 2014


On Apr 17, 2014, at 3:38 PM, Britt Gray <britt.c.gray at 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






More information about the Omaha-pm mailing list