Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

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

Perl::Critic::Policy::ValuesAndExpressions::RequireNumbeUseraContributed PPerl::Critic::Policy::ValuesAndExpressions::RequireNumberSeparators(3pm)

NAME
Perl::Critic::Policy::ValuesAndExpressions::RequireNumberSeparators - Write " 141_234_397.0145 " instead of " 141234397.0145 ". AFFILIATION
This Policy is part of the core Perl::Critic distribution. DESCRIPTION
Long numbers can be difficult to read. To improve legibility, Perl allows numbers to be split into groups of digits separated by underscores. This policy requires number sequences of more than three digits to be separated. $long_int = 123456789; #not ok $long_int = 123_456_789; #ok $long_float = 12345678.001; #not ok $long_float = 12_345_678.001; #ok CONFIGURATION
The minimum absolute value of numbers that must contain separators can be configured via the "min_value" option. The default is 10,000; thus, all numbers >= 10,000 and <= -10,000 must have separators. For example: [ValuesAndExpressions::RequireNumberSeparators] min_value = 100000 # That's one-hundred-thousand! NOTES
As it is currently written, this policy only works properly with decimal (base 10) numbers. And it is obviously biased toward Western notation. I'll try and address those issues in the future. AUTHOR
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com> COPYRIGHT
Copyright (c) 2005-2011 Imaginative Software Systems. 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 2012-0Perl::Critic::Policy::ValuesAndExpressions::RequireNumberSeparators(3pm)

Check Out this Related Man Page

Perl::Critic::Policy::ValuesAndExpressions::RequireUpperUserHConPerl::Critic::Policy::ValuesAndExpressions::RequireUpperCaseHeredocTerminator(3pm)

NAME
Perl::Critic::Policy::ValuesAndExpressions::RequireUpperCaseHeredocTerminator - Write " <<'THE_END'; " instead of " <<'theEnd'; ". AFFILIATION
This Policy is part of the core Perl::Critic distribution. DESCRIPTION
For legibility, HEREDOC terminators should be all UPPER CASE letters (and numbers), without any whitespace. Conway also recommends using a standard prefix like "END_" but this policy doesn't enforce that. print <<'the End'; #not ok Hello World the End print <<'THE_END'; #ok Hello World THE_END CONFIGURATION
This Policy is not configurable except for the standard options. SEE ALSO
Perl::Critic::Policy::ValuesAndExpressions::RequireQuotedHeredocTerminator AUTHOR
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com> COPYRIGHT
Copyright (c) 2005-2011 Imaginative Software Systems. 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 Perl::Critic::Policy::ValuesAndExpressions::RequireUpperCaseHeredocTerminator(3pm)
Man Page

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Replacing the first 0 with a number

Hi, Appreciate any help in advance ;-) There are some numbers between 0 and 1, 0 not included: .2500, .3333, .5000, .6666, .7500, 1.000 How to replace the first 0 ( after the dot ) with a number, say, if the number is 3: .2500 will be .2530 .5000 will be .5300 .7500 will be .7530 ... (3 Replies)
Discussion started by: wanttolearn
3 Replies

2. UNIX for Dummies Questions & Answers

Replace US numbers with European numbers

hey, I have a file with numbers in US notation (1,000,000.00) as well as european notation (1.000.000,00) i want all the numbers to be in european notation. the numbers are in a text file, so to prevent that the regex also changes the commas in a sentence/text i thought of: sed 's/,/\./'... (2 Replies)
Discussion started by: FOBoy
2 Replies

3. Shell Programming and Scripting

How to input text on every 2nd line?

I have a file in two columns consisting of only numbers. I would like to put a string (the same textstring) on every second line, so that 501006 420.000 401602 165.000 . . . becomes: *Some_text 501006 420.000 *Some_text 401602 165.000 *Some_text . . . Are you up for it? (7 Replies)
Discussion started by: Medova
7 Replies

4. Shell Programming and Scripting

How to generate 10.000 unique numbers?

hello, does anybody can give me a hint on how to generate a lot of numbers which are not identically via scripting etc? (7 Replies)
Discussion started by: xrays
7 Replies

5. AIX

Ajout colonne calcuée ds un fichier .txt

Mon but est de créer un script ksh ou commande aix permettant ceci. J'ai un fichier .txt organisé par bloc d'informations, chaque bloc débute par 000 et ce comme suit : 000... 001... 003... 004... 000... 001... 003... 004... . . .Mon but est d'ajouter une colonne en fin de chaque ligne afin... (2 Replies)
Discussion started by: zainab2006
2 Replies

6. Shell Programming and Scripting

Finding consecutive numbers in version names on a txt file

Hi all. I have a directory which contains files that can be versioned. All the files are named according to a pattern like this: TEXTSTRING1-001.EXTENSION TEXTSTRING2-001.EXTENSION TEXTSTRING3-001.EXTENSION ... TEXTSTRINGn-001.EXTENSION If a file is versioned, a file called ... (10 Replies)
Discussion started by: fox1212
10 Replies

7. Shell Programming and Scripting

File Processing

i am having the input file as below 123456789: xxxxx12xxxxxxxxxxxxxxxxxx a_cnt 123456789: xxxxxxxxxxxxxxxxxxxxxxx a_cnt 123456789: a_cnt xxxxaq1wsxxxxxxxxxxxx12xxxxxxxxxx 123456789: xxxxxxxxxxxxasxxxx a_cnt i need the numbers in the backets of a_cnt O/p required as below 1 2 3 4... (2 Replies)
Discussion started by: expert
2 Replies

8. Shell Programming and Scripting

Extracting substring

Hi, I have string in variable like '/u/dolfin/in/DOLFIN.PRL_100.OIB.TLU.001.D20110520.T040010' and i want to conevrt this string into only "DOLFIN.PRL_100.OIB.TLU.001.D20110520.T040010" (i.e file name). Is there any command to extracting string in some part ?(rather than whole path)? ... (5 Replies)
Discussion started by: shyamu544
5 Replies

9. UNIX for Advanced & Expert Users

Awk to print values of second file

Hello, I have a data file with 300,000 records in it, and another file which contains only the line numbers of roughly 13,000 records in the data file which have data integrity issues. I'm trying to find a way to print the original data by line number identified in the second file. How can I do... (2 Replies)
Discussion started by: peteroc
2 Replies

10. Shell Programming and Scripting

awk - how to compare part of the string?

Need help for awk.. file will have comma separated numbers, I need check digits before 10 numbers eg ( 001)1234567890 Basically want to check country code of a mobile number. eg: abc,def,data, data,0011234567890, data,data Script should be checking country code with 001, I will pass... (10 Replies)
Discussion started by: vegasluxor
10 Replies