How do I compare two strings in Perl?
How do I compare two strings in Perl? I am learning Perl, I had this basic question looked it up here on StackOverflow and found no good answer so I thought I would ask. 7 Answers 7
How do I compare two strings in Perl? I am learning Perl, I had this basic question looked it up here on StackOverflow and found no good answer so I thought I would ask. 7 Answers 7
I know what my is in Perl. It defines a variable that exists only in the scope of the block in which it is defined. What does our do? How does our differ from my? 12 Answers 12
What are all the ways of affecting where Perl modules are searched for? or, How is Perl’s @INC constructed? As we know, Perl uses @INC array containing directory names to determine where to search for Perl module files. There does not seem to be a comprehensive “@INC” FAQ-type post on StackOverflow, so this question is … Read more
I get this error: Can’t locate Foo.pm in @INC Is there an easier way to install it than downloading, untarring, making, etc? 24 Answers 24
I have tried: $var = false; $var = FALSE; $var = False; None of these work. I get the error message Bareword “false” not allowed while “strict subs” is in use. 9 Answers 9
Can someone please help me? In Perl, what is the difference between: exec “command”; and system(“command”); and print `command`; Are there other ways to run shell commands too? 5 Answers 5
I seem to have come across several different ways to find the size of an array. What is the difference between these three methods? my @arr = (2); print scalar @arr; # First way to print array size print $#arr; # Second way to print array size my $arrSize = @arr; print $arrSize; # Third … Read more
I am trying to figure out a way of checking for the existence of a value in an array without iterating through the array. I am reading a file for a parameter. I have a long list of parameters I do not want to deal with. I placed these unwanted parameters in an array @badparams. … Read more
How can I start an interactive console for Perl, similar to the irb command for Ruby or python for Python? 24 Answers 24
I’m trying to use a break statement in a for loop, but since I’m also using strict subs in my Perl code, I’m getting an error saying: Bareword “break” not allowed while “strict subs” in use at ./final.pl line 154. Is there a workaround for this (besides disabling strict subs)? My code is formatted as … Read more