Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

perl::critic::policy::valuesandexpressions::prohibitmismatchedop(3pm) [debian man page]

Perl::Critic::Policy::ValuesAndExpressions::ProhibitMismUsereContributPerl::Critic::Policy::ValuesAndExpressions::ProhibitMismatchedOperators(3pm)

NAME
Perl::Critic::Policy::ValuesAndExpressions::ProhibitMismatchedOperators - Don't mix numeric operators with string operands, or vice-versa. AFFILIATION
This Policy is part of the core Perl::Critic distribution. DESCRIPTION
Using the wrong operator type for a value can obscure coding intent and possibly lead to subtle errors. An example of this is mixing a string equality operator with a numeric value, or vice-versa. if ($foo == 'bar') {} #not ok if ($foo eq 'bar') {} #ok if ($foo eq 123) {} #not ok if ($foo == 123) {} #ok CONFIGURATION
This Policy is not configurable except for the standard options. NOTES
If warnings are enabled, the Perl interpreter usually warns you about using mismatched operators at run-time. This Policy does essentially the same thing, but at author-time. That way, you can find out about them sooner. AUTHOR
Peter Guzis <pguzis@cpan.org> COPYRIGHT
Copyright (c) 2006-2011 Peter Guzis. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module. perl v5.14.2 20Perl::Critic::Policy::ValuesAndExpressions::ProhibitMismatchedOperators(3pm)

Check Out this Related Man Page

Perl::Critic::Policy::ValuesAndExpressions::ProhibitSpecUserPerl::Critic::Policy::ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator(3)

NAME
Perl::Critic::Policy::ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator - Don't write " print <<'__END__' ". AFFILIATION
This Policy is part of the core Perl::Critic distribution. DESCRIPTION
Using one of Perl's special literals as a HEREDOC terminator could be confusing to tools that try to parse perl. print <<'__END__'; #not ok Hello world __END__ print <<'__END_OF_WORLD__'; #ok Goodbye world! __END_OF_WORLD__ The special literals that this policy prohibits are: __END__ __DATA__ __PACKAGE__ __FILE__ __LINE__ CONFIGURATION
This Policy is not configurable except for the standard options. SEE ALSO
Perl::Critic::Policy::ValuesAndExpressions::RequireUpperCaseHeredocTerminator Perl::Critic::Policy::ValuesAndExpressions::RequireQuotedHeredocTerminator AUTHOR
Kyle Hasselbacher <kyle@cpan.org> COPYRIGHT
Copyright (c) 2009-2011 Kyle Hasselbacher. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module. perl v5.16.3 Perl::Critic::Policy::ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator(3)
Man Page

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

time-out coding in perl

looking for ideas and not answers! to coding a timeout solution in Perl to answer a user prompt. ie, when the program asks whether to execute Y/N and no response is entered, after a time period (maybe 10 seconds) the program will automatically choose yes (or maybe no, whicheva). this isn't... (2 Replies)
Discussion started by: Shakey21
2 Replies

2. UNIX for Dummies Questions & Answers

Policy Manager

I have searched all over the SCO website and can't seem to find an answer to this error message. Has anyone seen the following error, and if so what steps do I need to take to fix it? I don't really want to reload the entire OS if I don't have to. LOGIN: ERROR- Failed to initialize policy... (1 Reply)
Discussion started by: mikeinmi
1 Replies

3. Shell Programming and Scripting

Split file

hey all, I have a file with the following format 2006-09-11 07:00:30|ORANGE|ABC|123 2006-09-11 07:40:08|APPLE|ABC|456 2006-09-11 13:20:10|APLE|DEF|789 2006-09-11 14:53:33|ORANGE|GHI|123 I want this file to be splitted into X number of files (where X is the distinct number of column 3); ... (3 Replies)
Discussion started by: mpang_
3 Replies

4. Shell Programming and Scripting

to find numbers in a string

I writing my script and got stuck in this function. Can someone help me? I need to extract out the numbers inside a string. Ex: INPUT -> OUTPUT abcdef123 -> 123 abc123def -> 123 123abcdef -> 123 a123bc45d -> 123 45 abcdefghi -> -1 Thank you! (12 Replies)
Discussion started by: fongthai
12 Replies

5. Shell Programming and Scripting

Quick question

When I have a file like this: 0084AF aj-123-a NAME Ajay NAME Kumar Engineer 015ED6 ck-345-c 020B25 ef-456-e 027458 pq-890-p NAME Peter NAME Salob Doctor 0318F0 xy-123-x NAME Xavier Arul NAME Yesu Supervisor 0344CA de-456-d where - The first NAME is followed by... (6 Replies)
Discussion started by: ajay41aj
6 Replies

6. Shell Programming and Scripting

how to poll for new files?

Hi , i have a requirement in which i have to ftp files to unix from windows and vice versa. I have to encrypt files in windows which will then be decrypted in unix and vice versa. Now the process needs to be automated ..therefore when windows server or unix server recieves the files a shell... (5 Replies)
Discussion started by: lifzgud
5 Replies

7. Shell Programming and Scripting

Converting from Centigrade to Fahrenheit and vice versa.

I need to write a script that will take the input from a file and convert the number from centigrade to fahrenheit and vice versa. This is what I have but it doesn't seem to be correct. Also the data file has 11 numbers inside of it and the output needs to be listed as so: Fahrenheit Temperature... (18 Replies)
Discussion started by: N1ckNak
18 Replies

8. Shell Programming and Scripting

Simple awk question

Hi All, A very silly question: How to just print the integer attached a particular string in a line by awk? Ex: Happy_world_foo123...So i just want the value 123 to be printed on the line where we have string "foo". Thanks (16 Replies)
Discussion started by: Indra2011
16 Replies

9. AIX

Password Policy

I need help. I have set a password policy. But I want to dis allow setting user name as password. My policy is as below... min length =8 min diff=2 min alpha=2 max repeats=2 dictionary= /usr/share/dict/words Still user can set his username as password (i.e. Jackie1234). Code tags for... (11 Replies)
Discussion started by: powerAIX
11 Replies

10. Programming

Error in executing the C program

Hello Friends, I have written a code for the unisex bathroom which makes a policy that when a woman is in the bathroom only other women may enter, but not men, and vice versa. This program consists of four functions which a user defines but these functions are not properly working while... (4 Replies)
Discussion started by: Ravi Tej
4 Replies