Sponsored Content
Full Discussion: Perl code request
Top Forums Shell Programming and Scripting Perl code request Post 302834321 by DGPickett on Thursday 18th of July 2013 05:15:36 PM
Old 07-18-2013
I'd use sed, but there is a sed equivalent PERL substitute to change such a line. Do you know how to read a file line by line and write the lines to a second file?
 

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

checking the request for urls - perl

hi everybody . i'm trying to extract a bunch of urls from an http request but when i do that i get nothing . here it's my code use LWP::UserAgent; $url = "$ARGV"; $ua = LWP::UserAgent->new; $req = HTTP::Request->new(GET=>$url); $res = $ua->request($req); if... (0 Replies)
Discussion started by: KiD0
0 Replies

2. Shell Programming and Scripting

Request to code review Suggestions Plz

Hello All, I have 2 questions, 1) I am on Unix Sun Solaris korn shell, in my shell scripts i am using #!/bin/sh Instead of #!/bin/ksh, though it is still working is this correct way of doing and also I am saving the shell script file as abc.sh instead of abc.ksh, please let me know the best... (1 Reply)
Discussion started by: Ariean
1 Replies

3. Shell Programming and Scripting

perl: a way to see a sub code in debug mode: perl -de 0 ?

Is there a way to see or print a sub code? Sometime a sub could be already defined, but in the debug mode (so, interactively) it could be already out of screen. So, I would think about a way to check if the sub is defined (just 'defined' is not a problem) and how it is defined. Also, if... (4 Replies)
Discussion started by: alex_5161
4 Replies

4. Programming

Perl- How to catch the file in perl code?

Hi, plz see the below code , i have catch the file "Orders.20110714.out "file as a Orders*.out. but it giving me an error .it does not open the file. if the same thing i have done by code code-> ls Orders*.out then it gives me the output Orders.20110714.out i am trying apply the... (1 Reply)
Discussion started by: pspriyanka
1 Replies

5. Shell Programming and Scripting

Request for horizontal formatting code

The input file contains 4 bytes per row 1 2 3 4 5 6 7 8 9 10 11 12 * * * 108 1 2 3 4 5 6 7 8 9 10 11 12 * * * 108 I need to put them in a horizontal manner and this need to repeat after every 108 lines lso the output comes as 1 2 3 4 5 6 7 8 9 10 11 12 ..... 108 1 2... (4 Replies)
Discussion started by: necro98
4 Replies

6. Programming

Perl -- code

Hi All, I new to perl scripting, trying to write a program to get multiple inputs from the users and it should be stored in one variable. can some one help me with it . here is the sample code i tried , but its not working. # cat array.pl #!/usr/bin/perl print "enter the total no of... (4 Replies)
Discussion started by: nanduri
4 Replies
Perl::Critic::Policy::ValuesAndExpressions::RestrictLongUsernContributed Perl DoPerl::Critic::Policy::ValuesAndExpressions::RestrictLongStrings(3)

NAME
Perl::Critic::Policy::ValuesAndExpressions::RestrictLongStrings - Stop mixing long strings with code. AFFILIATION
This policy is part of Perl::Critic::More, a bleeding edge supplement to Perl::Critic. DESCRIPTION
Long text strings in the middle of code is very distracting and wreaks havoc on code formatting. Consider putting long strings in external data files, "__DATA__" sections, or in their own subroutines. This policy complains if a long string is not the last line of a subroutine. "Long" is defined as 78 characters by default. This value can be altered in your Perl::Critic configuration via the "max_length" property. For example, you may add the following to your .perlcriticrc file: [ValuesAndExpressions::RestrictLongStrings] max_length = 50 SEE ALSO
AUTHOR
Chris Dolan <cdolan@cpan.org> COPYRIGHT
Copyright (c) 2006-2008 Chris Dolan 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-06-10 Perl::Critic::Policy::ValuesAndExpressions::RestrictLongStrings(3)
All times are GMT -4. The time now is 11:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy