Perl Reguler expression meaning

Hello there,
could you please Help me,
My perl scrpt is
#if (($infoline =~ /$costCenter/) && !($infoline =~ /_/))
                  if ($infoline =~ /[^_]$costCenter/)
                  {
                        $debugString = $infoline;
                        myDebug();
                        $receivedLoginPath = $infoline;
                  }

            }

What the regular expression tell in tthis matter?

Because I need to get in the log file is below info,

CTSA1_state=Name of the state.
CTSA1_city=_Name of the city.
CTSA1_postalCode=5 numbers
CTSA1_company=Name of the Company
CTSA1_sAMAccountName=Some specific account name
CTSA1_scriptPath=\alluser.bat (Specially here instead of just /alluser.bat I should have got Company name/Department/COst center number/alluser.bat)

how I shoul dget it?
Is there anything wrong in regular expression or what?
Thank you,

racheleeAsked:
Who is Participating?
 
ozoCommented:
for example, if $costCenter is X then $infoline =~ /[^_]$costCenter/   it true when $infoline contanins a character other than _ followed by X

if $costCenter is )(**  then /[^_]$costCenter/ is an error
0
 
ozoCommented:
it tells whether $infoline contains a character other than _ followed by whatever is matched by $costCenter

If there is something wrong in $costCenter, then there is something wrong in the regular expression
0
 
racheleeAuthor Commented:
Mr OZO,
Thnx a lot for a prompt reply ,

would u please give more explaination about this
>>it tells whether $infoline contains a character other than _ followed by whatever is matched by $costCenter

Because I am new bie ..Sorry to bother u.
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
racheleeAuthor Commented:
yep I could solve it dear ...
Thank you so much....

I appreaciate u for explaining it.
I just put a debug there for cost center and worked well...
0
 
racheleeAuthor Commented:
Would please so kind to suggest what all I can read to understand regarding Perl scripting and problems or tutorials regarding the same.

Thanking you,
0
 
racheleeAuthor Commented:
Please let m eknow if you can...but only online stuff I can not buy books I think.
0
 
ozoCommented:
perldoc perlre
0
 
racheleeAuthor Commented:
thnx ,

have a nice day...byeeee
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.