CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Regular Expressions: Re: [vikas.deep] Selecting a specific element of an array using regex? : Edit Log



crabigailrose
Novice

Jul 7, 2009, 8:16 AM


Views: 9458
Re: [vikas.deep] Selecting a specific element of an array using regex?

I am still having problems with that line


Code
@lines = split (/\n/, $input)


but I'm not sure how to do what I need to without using the split?

When I run it I get

Use of uninitialized value in string eq at ./connect.pl line 69, <SCAN> chunk 4.
Use of uninitialized value in string eq at ./connect.pl line 69, <SCAN> chunk 4.
Use of uninitialized value in string eq at ./connect.pl line 69, <SCAN> chunk 4.
Goose

I can't figure out why I keep getting the uninitialized values...its more or less doing what its supposed to by printing "Goose" which is the essid of the only network im in range of right now. Line 69 is


Code
 
if ($1 eq $essid)


You are right, vikas.deep its something to do with my split, $essid is the uninitalized value. I'm getting the error 3 times and have 3 profiles in @inputs, so its happening on every iteration of my foreach loop. However it is matching $1 and $essid, and printing the correct profile...why would $essid be uninitialized if its finding the right profile?

And I wasn't being sarcastic, sorry if it came off that way. I didn't understand your post and was asking you to clarify.


(This post was edited by crabigailrose on Jul 7, 2009, 9:39 AM)


Edit Log:
Post edited by crabigailrose (Novice) on Jul 7, 2009, 9:39 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives