| dondelelcaro | you turn it into an array, then you evaluate that in scalar context |
| ScribbleJ | spaffum - maybe you want join? |
| sncln | does it matter to you how he asks if you want to truly help people? |
| kalila | what's an easy array inclusion test? if "some word" exists in @array? |
| mauke | spaffum: what you're asking doesn't make sense |
| QtPlatypus | spaffum: You wish to get a count of the elements? |
| ScribbleJ | Oh, spaffum, use "scalar" |
| mauke | kalila: perldoc -q contain |
| spaffum | i want to get the count of elems in an if statement |
| ScribbleJ | if($count == scalar @array) |
| dondelelcaro | spaffum: but odds are you're talking about evaluating an array in scalar context, not a list. |
| peshalto | ScribbleJ: extra = |
| spaffum | ah okay thanks that's what i was looking for |
| Khisanth | spaffum: something is not adding up, you have a literal list and you need to know the count? |
| peshalto | ScribbleJ: crap, no, sorry |
| ScribbleJ | peshalto, what?! |
| spaffum | it's an array |
| ScribbleJ | :P |
| kalila | mauke: how did you get to know so much about perl (I admire that) |
| dondelelcaro | spaffum: right; then if (@array) {} or otherwise put array into scalar context |
| action | peshalto lifts bottle, looks at it, shakes head at self |
| peshalto | lifts bottle, looks at it, shakes head at self |
| mauke | if (@array) # has elements |
| QtPlatypus | spaffum: Lists and arrays are diffrent. |
| mauke | kalila: writing small scripts, reading perldocs, writing more silly scripts, reading more perldocs, ... :-) |
| spaffum | dondelelcaro: oh if (@array) checks the count as scalar? |
| scrottie | Look at nude pictures of Linus Torvalds... Looking.. |
| spaffum | QtPlatypus: ok sorry I won;t call arrays lists anymore! :) |
| dondelelcaro | spaffum: if is scalar context, so yes. |
| mauke | yes, if evaluates the condition in scalar context |
| spaffum | ok i thought I had to specifically coerce it to scalar |
| Khisanth | sncln: we are usually not interested in helping people who are not interested in learning because that usually ends up being extremely frustrating |
| spaffum | mauke: understood - thanks guys |
| dondelelcaro | spaffum: nah; you can do it if you want, but it's just redundant. |
| ScribbleJ | And ... if he doesnt' want to learn, honestly, he shoudl drop the class. For real. |
| spaffum | dondelelcaro: i see - i didn't realize if did stuff in scalar already |
| QtPlatypus | Can I go? my $re = qr/something(.*)/;if ($data =~ $re) {print $1}; # And expect it to work reliably? |
| spaffum | thanks folks you are always enlightening :) |
| mauke | boolean context ISA scalar context |
| sncln | khisanth: Amar was asking for his girlfriend who has been morbidly ill for a week and unable to leave her bed and the assignment is due tomorrow. I know the assignment is neither your priority nor your problem. |