Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

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

Perl::Critic::Policy::ValuesAndExpressions::ProhibitImplUserNContributed)Perl::Critic::Policy::ValuesAndExpressions::ProhibitImplicitNewlines(3pm)

NAME
Perl::Critic::Policy::ValuesAndExpressions::ProhibitImplicitNewlines - Use concatenation or HEREDOCs instead of literal line breaks in strings. AFFILIATION
This Policy is part of the core Perl::Critic distribution. DESCRIPTION
Strings with embedded line breaks are hard to read. Use concatenation or HEREDOCs instead. my $foo = "Line one is quite long Line two"; # Bad my $foo = "Line one is quite long Line two"; # Better, but still hard to read my $foo = "Line one is quite long " . "Line two"; # Better still my $foo = <<'EOF'; # Use heredoc for longer passages Line one is quite long Line two Line three breaks the camel's back EOF CONFIGURATION
This Policy is not configurable except for the standard options. AUTHOR
Chris Dolan <cdolan@cpan.org> CREDITS
Initial development of this policy was supported by a grant from the Perl Foundation. COPYRIGHT
Copyright (c) 2007-2011 Chris Dolan. Many 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-Perl::Critic::Policy::ValuesAndExpressions::ProhibitImplicitNewlines(3pm)

Check Out this Related Man Page

Perl::Critic::Policy::ValuesAndExpressions::ProhibitImplUserNContributed PePerl::Critic::Policy::ValuesAndExpressions::ProhibitImplicitNewlines(3)

NAME
Perl::Critic::Policy::ValuesAndExpressions::ProhibitImplicitNewlines - Use concatenation or HEREDOCs instead of literal line breaks in strings. AFFILIATION
This Policy is part of the core Perl::Critic distribution. DESCRIPTION
Strings with embedded line breaks are hard to read. Use concatenation or HEREDOCs instead. my $foo = "Line one is quite long Line two"; # Bad my $foo = "Line one is quite long Line two"; # Better, but still hard to read my $foo = "Line one is quite long " . "Line two"; # Better still my $foo = <<'EOF'; # Use heredoc for longer passages Line one is quite long Line two Line three breaks the camel's back EOF CONFIGURATION
This Policy is not configurable except for the standard options. AUTHOR
Chris Dolan <cdolan@cpan.org> CREDITS
Initial development of this policy was supported by a grant from the Perl Foundation. COPYRIGHT
Copyright (c) 2007-2011 Chris Dolan. Many 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.16.3 2014-06Perl::Critic::Policy::ValuesAndExpressions::ProhibitImplicitNewlines(3)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed help

hi i can't convert a string to a new line character via this command: sed -e "s/<string>/\n/g" source > target all it does is change <string> to n. is there anything wrong? (7 Replies)
Discussion started by: cdrk823
7 Replies

2. UNIX for Advanced & Expert Users

unexpected EOF

I ran the following scripts and everytime i get the errot as follows Line 54: unexpected EOF while looking for matching ',' line 57 syntex error unexpected end of file#!/bin/ksh set -x BKUP_DIR=/u03/backups/abu/nightly_backup LOG_FILE=/u03/backups/abu/backup.log ORACLE_HOME=... (9 Replies)
Discussion started by: manna
9 Replies

3. Shell Programming and Scripting

using awk to extract text between two constant strings

Hi, I have a file from which i need to extract data between two constant strings. The data looks like this : Line 1 SUN> read db @cmpd unit 60 Line 2 Parameter: CMPD -> "C00071" Line 3 Line 4 SUN> generate Line 5 tabint>ERROR: (Variable data) The data i need to extract is... (11 Replies)
Discussion started by: mjoshi
11 Replies

4. Shell Programming and Scripting

Activate all Linux services script

Now i'm up to making a script from which you could activate all Linux services without being an expert. It's gonna be a powerful tool, I'll look forward to make it able to change the port which the service is assigned to. But I need some help, post some script to activate services and I'll fusion... (8 Replies)
Discussion started by: Dax01
8 Replies

5. Shell Programming and Scripting

SED programming

Hi Folks, I have one file which contains the data like below. gggsdvrwdtydjnnc%vhdskl;jf;whjfuyijfnv,m%jkgsjkfsjkjdlkl%gjksdhfljkfjkj% I want to replace % to the Line feed. I mean the result should be like below. gggsdvrwdtydjnnc vhdskl;jf;whjfuyijfnv,m jkgsjkfsjkjdlkl... (12 Replies)
Discussion started by: pradeesh
12 Replies

6. Shell Programming and Scripting

Spacing between words

Hi I have a csv file in below format First Line=1 Second Line=2 And the third Line=3 Now comes the fourth Line=4 I want to insert spaces so that the output would be First Line=1 Second Line=2 And the third Line=3 Now comes the fourth Line=4 Can anyone help me do... (10 Replies)
Discussion started by: msivask
10 Replies

7. Shell Programming and Scripting

How to get evenly Line numbers?

hi there , i m new to unix , i d like to ask how can a get only even numbered lines matches with the word i search from txt file for example : 3461:1.D. The copyright laws of the place where you are located also govern 3471:1.E. Unless you have removed all references to Project... (17 Replies)
Discussion started by: brhn
17 Replies

8. Shell Programming and Scripting

How to fix line breaks format text for huge files?

Hi, I need to correct line breaks for huge files (more than 1MM records in a file) and then format it properly. Except the header and trailer, each record starts with 'D'. Requirement:Scan the whole file except the header and trailer records and see if any of the records start with... (19 Replies)
Discussion started by: kikionline
19 Replies

9. Shell Programming and Scripting

Remove line breaks after a match

I need to remove all line breaks in a document after a match, until there is a blank line. Example below, after the match "THE GREEN TABLE" remove line breaks until a blank line. Then, after the match "THE BLUE TABLE" do the same. Before: THE GREEN TABLE Lorem ipsum dolor sit amet,... (14 Replies)
Discussion started by: dockline
14 Replies

10. Shell Programming and Scripting

Questions on removing unexpected line breaks

I am a newbie in Linux and I am having trouble with a piece of data on hand. The source data is like a|b|c|d e|f|g |h i|j|k|l m|n|o |p 1|2|3|4 5|6|7| 8 a|b|c|d e|f|g|h For each line, there should be 4 fields separated by the "|", but unfortunately there are unexpected line breaks... (13 Replies)
Discussion started by: Nekki Basara
13 Replies

11. 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

12. Shell Programming and Scripting

Perl match pattern

Hi all, i have a peice of Perl script like this: foreach (@line) { @tmp = split /;/,$_; #print "Line is: $_\n"; switch($tmp){ case m/p60/i { push @p60, , $tmp ]; ... (7 Replies)
Discussion started by: arrals_vl
7 Replies

13. Shell Programming and Scripting

Read File Line by Line

Bash Macosx 10.9 I have a txt file formatted as follows: filepath1,countryX filepath2,countryY filepath3,countryX ...etc How can I read this line by line? Esentially I want to read filepath1 and run a command based on it's correlation with the country on the same line, then move onto... (8 Replies)
Discussion started by: sudo
8 Replies

14. Shell Programming and Scripting

How to delete all lines before a particular pattern when the pattern is defined in a variable?

I have a file Line 1 a Line 22 Line 33 Line 1 b Line 22 Line 1 c Line 4 Line 5 I want to delete all lines before last occurrence of a line which contains something which is defined in a variable. Say a variable var contains 'Line 1', then I need the following in the output. ... (21 Replies)
Discussion started by: Soham
21 Replies

15. Shell Programming and Scripting

Replace a number in the last line of a delimited file.

Hi all, I am fairly new to UNIX and I was wondering if you could provide me with some help! Lets say i have a file as below : Line 1 Line 2 Line 3 ABC|12|4|2 Now the number 4 in bold, this number will represent the number of row there is in the file excluding the header and footer... (10 Replies)
Discussion started by: Stinza
10 Replies