Please m new around here! Can anyone take me thru implementing bootp on my thin clients via my central server?
Preciate ur assistance. Thanks folks! (2 Replies)
I'm trying to make this long line of codes in Perl looks nice by dividing it into 2 lines...
Before:
`echo "blahblahblahblahblahblahblahblahblahblahblah" > ~/lalala/lalala/lalala/lalala/lalala/abc`;
After:
`echo "blahblahblahblahblahblahblahblahblahblahblah" >
... (5 Replies)
Hi there, I have an example basic script (below) and ive been trying to figure out how to stop multiple arguments to my options occuring. for example using the example script below I can issue two arguments for, say the --surname option and it will not barf at me (although thats what i want it to... (11 Replies)
print "1.readfromfile\n2.add_ex1(4,5)\n3.add_ex2(11,5)\n4.add_ex3(9,3)\n5.add_ex4(91,4)\n";
How to do it in this form:
print "1.readfromfile\n
2.add_ex1(4,5)\n
3.add_ex2(11,5)\n
4.add_ex3(9,3)\n
5.add_ex4(91,4)\n"; (3 Replies)
echo "1337124526" | perl -pe 's/(\d+)/easttime($1)/e'
the above gives a date and time.
how can i subtract the date and time given by this command, from the current present date?
can this be a one liner or as close to a one-liner as possible? (1 Reply)
Hi,
I have a very long pipe delimited string. The length of the string could vary. For example:
START|one|two|three|four|five|six|seven
START|one|two|three|four|five|six|seven|eight|nine
START|one|two|three|four
I want to replace in the third occurence of string with another... (9 Replies)
Hi All
I am using Getopt::Long in perl and i am trying to have it so if i dont supply a switch after the progname is will do a defult option
i have the following
GetOptions($OPT,
'debug|d',
'mail|m',
) or info();
i want it run the debug if it is not given a switch
... (1 Reply)
While going through some of the perl script...
I had found the below line..
use Getopt::Long;
my $GetOptionsReturnCode = GetOptions ( '<>' => sub { push(@unknownArg, @_); }, 'h|help' => sub { &helpMessage(); exit 0; }, );
Could anyone please explain the above one ... (1 Reply)
Perl::Critic::Policy::BuiltinFunctions::ProhibitVoidGrepUser Contributed Perl DocumentaPerl::Critic::Policy::BuiltinFunctions::ProhibitVoidGrep(3)NAME
Perl::Critic::Policy::BuiltinFunctions::ProhibitVoidGrep - Don't use "grep" in void contexts.
AFFILIATION
This Policy is part of the core Perl::Critic distribution.
DESCRIPTION
"map" and "grep" are intended to be pure functions, not mutators. If you want to iterate with side-effects, then you should use a proper
"for" or "foreach" loop.
grep{ print frobulate($_) } @list; #not ok
print map{ frobulate($_) } @list; #ok
grep{ $_ = lc $_ } @list; #not ok
for( @list ){ $_ = lc $_ }; #ok
map{ push @frobbed, frobulate($_) } @list; #not ok
@frobbed = map { frobulate($_) } @list; #ok
CONFIGURATION
This Policy is not configurable except for the standard options.
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.16.3 2014-06-09 Perl::Critic::Policy::BuiltinFunctions::ProhibitVoidGrep(3)