perl 5.6.1:
when i try a "system" command(with if loops for $?), i get this:
child exited with value 1
what is meant by this $? values and what does it meant if it returns 1?.. (0 Replies)
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Hi All,
I have working (Perl) code to combine 2 input files into a single output file using the join function that works to a point, but has the following limitations:
1. I am restrained to 2 input files only.
2. Only the "matched" fields are written out to the "matched" output file and... (1 Reply)
Hi all,
First off, sorry for a long post but I think I have no other option if I need to explain properly what I need help for.
I need some advise on how best to check for "faulty" or "stalled/jammed' print queues. At the moment, I have three (3) application servers which also acts as print... (0 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
What exactly is this code returning:
perl -MConfig -e 'print "$Config{byteorder}\n";'
I am executing this command in two platforms.
In AIX i am getting : 4321
In Linux i am getting: 12345678
Does it mean that a byte size in aix is of 4 bits(is it possible)?
Also, will there be... (2 Replies)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Hi,
I am currently writing a perl module that will be passed queries from other scripts and use DBI to execute them on an Oracle Database. The problem I have is when it comes to the return.
I am currently getting this from my code:
FIELDA FIELDB FIELDC ... (6 Replies)
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Perl::Critic::Policy::InputOutput::ProhibitTwoArgOpen(3)User Contributed Perl DocumentatioPerl::Critic::Policy::InputOutput::ProhibitTwoArgOpen(3)NAME
Perl::Critic::Policy::InputOutput::ProhibitTwoArgOpen - Write "open $fh, q{<}, $filename;" instead of "open $fh, "<$filename";".
AFFILIATION
This Policy is part of the core Perl::Critic distribution.
DESCRIPTION
The three-argument form of "open" (introduced in Perl 5.6) prevents subtle bugs that occur when the filename starts with funny characters
like '>' or '<'. The IO::File module provides a nice object-oriented interface to filehandles, which I think is more elegant anyway.
open( $fh, '>output.txt' ); # not ok
open( $fh, q{>}, 'output.txt' ); # ok
use IO::File;
my $fh = IO::File->new( 'output.txt', q{>} ); # even better!
It's also more explicitly clear to define the input mode of the file, as in the difference between these two:
open( $fh, 'foo.txt' ); # BAD: Reader must think what default mode is
open( $fh, '<', 'foo.txt' ); # GOOD: Reader can see open mode
This policy will not complain if the file explicitly states that it is compatible with a version of perl prior to 5.6 via an include
statement, e.g. by having "require 5.005" in it.
CONFIGURATION
This Policy is not configurable except for the standard options.
NOTES
There are two cases in which you are forced to use the two-argument form of open. When re-opening STDIN, STDOUT, or STDERR, and when doing
a safe pipe open, as described in perlipc.
SEE ALSO
IO::Handle
IO::File
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.
perl v5.16.3 2014-06-09 Perl::Critic::Policy::InputOutput::ProhibitTwoArgOpen(3)