Re: Where to put xs files?

2016-06-09 Thread sisyphus1
From: Alex Becker Sent: Thursday, June 09, 2016 4:45 AM To: beginners@perl.org Subject: Where to put xs files? Hi! Where do I put xs files in a module distribution? For example, the module Tk::IDElayout contains the following files: * CaptureRelease.pm * CaptureRelease.xs * WmCaptureRelease.c *

Re: Extracting value from regex

2016-06-09 Thread Shlomi Fish
Hi Punit, see below for my reply. On Thu, 9 Jun 2016 14:17:17 +0530 Punit Jain wrote: > Hi , > > Below is the problem I am facing : > > #!/usr/bin/perl > Always start your program with "use strict;" and "use warnings;" or equivalent. See: * http://perl-begin.org/tutorials/bad-elements/ >

Re: Extracting value from regex

2016-06-09 Thread Neil Bowers
Hi Punit, > /ldap:\/\/\/(.+)|mailto:(.+)/; > When i run this I get uid=user1,ou=People,o=test.com as > output however don't get y...@gmail.com printed. > The mailto is matched by $2, not $1. You can confirm this by changing your print line

Extracting value from regex

2016-06-09 Thread Punit Jain
Hi , Below is the problem I am facing : #!/usr/bin/perl my @str = ('mailto:y...@gmail.com','ldap:///uid=user1,ou=People,o=test.com '); foreach (@str) { # split off ldaps and mailtos my @addr = $_ =~ /ldap:\/\/\/(.+)|mailto:(.+)/; print $1; } When i run