Sponsored Content
Top Forums Programming Just a short question in Perl Post 302975595 by AIMBOT DC on Wednesday 15th of June 2016 07:54:08 PM
Old 06-15-2016
^_^

Thank you Aia
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

PERL Question

Can anyone tell me if the copy command in PERL has the same functionality as in KSH shell in UNIX or does it actually move the file ?? $cp_stat=system("cp $ENV{OLAMEBSDIR}/data/olam.ddabal$type $ENV{OLAMDIR}/balance/data/olam.ddabal$type.$HeaderDate"); (1 Reply)
Discussion started by: frank
1 Replies

2. Shell Programming and Scripting

Perl question

Hi everyone, Is Perl compiled? I keep running into references to Perl being compiled which is drivin me nuts because I thought it was an interpreted language. I am tired of the confusion, I am obviously misunderstanding something. Would someone mind explaining to me the exact order of events... (1 Reply)
Discussion started by: Jubba
1 Replies

3. Shell Programming and Scripting

Perl question

Hello Everybody, I am using perl..... I have a variable called line which stores the line of a file. I dont know how many words there will be in this line. But I would like to find out in perl and also store these words in the $1,$2,$3 and $4 variables eg if the line is "first second... (2 Replies)
Discussion started by: rkap
2 Replies

4. Shell Programming and Scripting

perl question

If I use 2 system commands in a script, will one finish before the next one starts? or will it start the first and the second at the same time? i.e. system("ps | grep rminer"); system("ls -al | grep 431"); (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies

5. Shell Programming and Scripting

perl question

perl -wnl -e '/\bsomepattern\b/i and print $&;' I know above command only greps out the somepattern and print them(not entire line).. but how do I look for multiple pattern and only print them.. is that possible? perl -wnl -e '/\bsomepatternd\b/i and /\bsomepattern2\b/i and print $&;' does... (7 Replies)
Discussion started by: convenientstore
7 Replies

6. Shell Programming and Scripting

Perl Question

Hello all, I have the following line: xxx|xxxx|xxxx|xxx.xx|xxx And i insert the values in an array. I am trying to find out if the field of the array (where field=xxx.xx) has the '.' character. I am using the code below but it doesn't seem to work. if($field=~ /./) { ... (3 Replies)
Discussion started by: chriss_58
3 Replies

7. Linux

short question about cron and Mailoutput

Hi Guys, short question - thereīs every 5 minutes an cronjob for user "wwwrun" - and every 5 minutes root gets an email about this cronjob. Now my question: how can i realize, that root donīt get an email about this cronjob but on all other jobs ... perhaps crontab for wwwrun: */5... (2 Replies)
Discussion started by: jackcracker
2 Replies

8. Shell Programming and Scripting

PERL question

Hi, we complied the perl on diff machine ( /opt/dba/perl-5.8.8) . Created TAR and using it on diff box ( again the location is same) . when I tried to put this tar to diff locaiton , it PERL connections are failing . because the @ INC still pinting to : oracle@abc:/opt/dba/oraadmin/tools DEV$... (1 Reply)
Discussion started by: talashil
1 Replies

9. Programming

Perl question

Hi, please help me with below question i am executing the below command from command line perl -e '($hi)=glob("nosum*"); print "$hi"'; As i have nosum_website.sh file in current directory it gave the following output $ perl -e '($hi)=glob("nosum*"); print "$hi"';... (2 Replies)
Discussion started by: ragilla
2 Replies

10. Shell Programming and Scripting

Perl question about

Hello everybody, I am new at the forum and a total newbie when it comes to Unix. I am trying to see how I can add the ability to kill a user's processes? I want to add this to my Shel Script Add the code/process into a subroutine. Also, I would like to use an array to store the list... (0 Replies)
Discussion started by: kinelisch
0 Replies
boolean(3pm)						User Contributed Perl Documentation					      boolean(3pm)

NAME
boolean - Boolean support for Perl SYNOPSIS
use boolean; do &always if true; do &never if false; do &maybe if boolean($value)->isTrue; and: use boolean ':all'; $guess = int(rand(2)) % 2 ? true : false; do &something if isTrue($guess); do &something_else if isFalse($guess); and: use boolean -truth; die unless ref(42 == 42) eq 'boolean'; die unless ("foo" =~ /bar/) eq '0'; DESCRIPTION
Most programming languages have a native "Boolean" data type. Perl does not. Perl has a simple and well known Truth System. The following scalar values are false: $false1 = undef; $false2 = 0; $false3 = 0.0; $false4 = ''; $false5 = '0'; Every other scalar value is true. This module provides basic Boolean support, by defining two special objects: "true" and "false". RATIONALE
When sharing data between programming languages, it is important to support the same group of basic types. In Perlish programming languages, these types include: Hash, Array, String, Number, Null and Boolean. Perl lacks native Boolean support. Data interchange modules like YAML and JSON can now "use boolean" to encode/decode/roundtrip Boolean values. FUNCTIONS
This module defines the following functions: true This function returns a scalar value which will evaluate to true. The value is a singleton object, meaning there is only one "true" value in a Perl process at any time. You can check to see whether the value is the "true" object with the isTrue function described below. false This function returns a scalar value which will evaluate to false. The value is a singleton object, meaning there is only one "false" value in a Perl process at any time. You can check to see whether the value is the "false" object with the isFalse function described below. boolean($scalar) Casts the scalar value to a boolean value. If $scalar is true, it returns "boolean::true", otherwise it returns "boolean::false". isTrue($scalar) Returns "boolean::true" if the scalar passed to it is the "boolean::true" object. Returns "boolean::false" otherwise. isFalse($scalar) Returns "boolean::true" if the scalar passed to it is the "boolean::false" object. Returns "boolean::false" otherwise. isBoolean($scalar) Returns "boolean::true" if the scalar passed to it is the "boolean::true" or "boolean::false" object. Returns "boolean::false" otherwise. METHODS
Since true and false return objects, you can call methods on them. $boolean->isTrue Same as isTrue($boolean). $boolean->isFalse Same as isFalse($boolean). USE OPTIONS
By default this module exports the "true", "false" and "boolean" functions. The module also defines these export tags: :all Exports "true", "false", "boolean", "isTrue", "isFalse", "isBoolean" -truth You can specify the "-truth" option to override truth operators to return "boolean" values. use boolean -truth; print ref("hello" eq "world"), " "; Prints: boolean "-truth" can be used with the other import options. AUTHOR
Ingy doet Net <ingy@cpan.org> COPYRIGHT
Copyright (c) 2007, 2008, 2010, 2011. Ingy doet Net. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html perl v5.12.4 2011-09-12 boolean(3pm)
All times are GMT -4. The time now is 02:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy