Visit Our UNIX and Linux User Community

Top Forums Shell Programming and Scripting perl newbie . &&..programming newbie (question 2) Post 302314136 by ghostdog74 on Thursday 7th of May 2009 12:26:47 PM
Old 05-07-2009
check File::Find
Test Your Knowledge in Computers #525
Difficulty: Medium
In ASCII, to convert between uppercase and lowercase versions, you only need to invert the second bit (0 for uppercase, 1 for lowercase).
True or False?

10 More Discussions You Might Find Interesting

1. Programming

programming question from a newbie, please help

Hi Everyone, I really hope I could get some insight from a few of you, I've been searching the net for various resources, and this board seems to be the friendliest and most helpful by far. I work for a medical research company and we use sun 4 and we have different studies that have their... (1 Reply)
Discussion started by: milenky
1 Replies

2. Shell Programming and Scripting

Perl newbie question

Can someone tell me what this is doing? I know it is reading records from a table and puts them in a hash. How do I print out, let's say, the first 5 columns of data (assuming columns are named col1, col2, ...)? $sth = $dbh->prepare("select * from stsc.loc ... (2 Replies)
Discussion started by: ssmiths001
2 Replies

3. UNIX for Dummies Questions & Answers

Newbie ? Need Help with If/Then & Line Breaks...

I hope this makes sense, but I need help with what is indicated with %%, below : A.) ####List active servers and send to file#### # ps -ef | grep jboss | grep sh | awk '{if ($14) {print $12;}else {print $11}}' | sort > /export/home/kthatch/script_results client302 client306 client309... (1 Reply)
Discussion started by: kthatch
1 Replies

4. UNIX for Dummies Questions & Answers

UNIX newbie NEWBIE question!

Hello everyone, Just started UNIX today! In our school we use solaris. I just want to know how do I setup Solaris 10 not the GUI one, the one where you have to type the commands like ECHO, ls, pwd, etc... I have windows xp and I also have vmware. I hope I am not missing anything! :p (4 Replies)
Discussion started by: Hanamachi
4 Replies

5. Shell Programming and Scripting

perl newbie . &&..programming newbie

Hi, I am new to programming and also to perl..But i know 'perl' can come to my rescue, But I am stuck at many places and need help..any small help is much appreciated... below is the description of what i intend to acheive with my script. I have a files named in this format... (13 Replies)
Discussion started by: xytiz
13 Replies

6. UNIX for Dummies Questions & Answers

perl newbie question

I have the following question in perl, I have come up with couple of solutions,Perl gurus please help me find the best answer to my question? You have a PERL database named DataEntryData, and you need to separate out the various values from the DB entry $item, delimited by the ^ sumbol. There... (2 Replies)
Discussion started by: ramky79
2 Replies

7. SCO

newbie - CUPS installation & C compiler

Ok new in here so be gentle: I'm a programmer with the need to also be a sys admin on a box running: Client has purchased a Kyocera KM-4035 do it all machine. However, no driver exists for SCO and when I contacted their Kyocera rep he told me to install CUPS. I downloaded CUPS and ran... (2 Replies)
Discussion started by: bbxguy
2 Replies

8. Red Hat

newbie: Linux Server Names & Types..!!!

Any one tell me about the list of Redhat Linux Enterprise 5 SERVERS and their functions. thanks (3 Replies)
Discussion started by: salman103
3 Replies

9. Shell Programming and Scripting

Perl newbie question re: variables

Hi there apologies for the really basic question but if i have a variable called $string that I want to run a regex against and output to another variable do i do it, I know that if i wanted to alter the current $string variable i would do $string=~ s/old/new/g; but i kind of want... (2 Replies)
Discussion started by: rethink
2 Replies

10. AIX

Newbie & LPAR

Hello, what is the meaning of: lparstat -i Node Name : **** Partition Name : **** Partition Number : 1 Type : Shared-SMT Mode : Capped Entitled Capacity : 2.00 Partition Group-ID : 32769 Shared Pool ID : 0 Online Virtual CPUs : 4 Maximum Virtual CPUs : 4 Minimum Virtual CPUs :... (5 Replies)
Discussion started by: Talulah
5 Replies
File::Find::Rule::Extending(3pm)			User Contributed Perl Documentation			  File::Find::Rule::Extending(3pm)

File::Find::Rule::Extending - the mini-guide to extending File::Find::Rule SYNOPSIS
package File::Find::Rule::Random; use strict; # take useful things from File::Find::Rule use base 'File::Find::Rule'; # and force our crack into the main namespace sub File::Find::Rule::random () { my $self = shift()->_force_object; $self->exec( sub { rand > 0.5 } ); } 1; DESCRIPTION
File::Find::Rule went down so well with the buying public that everyone wanted to add extra features. With the 0.07 release this became a possibility, using the following conventions. Declare your package package File::Find::Rule::Random; use strict; Inherit methods from File::Find::Rule # take useful things from File::Find::Rule use base 'File::Find::Rule'; Force your madness into the main package # and force our crack into the main namespace sub File::Find::Rule::random () { my $self = shift()->_force_object; $self->exec( sub { rand > 0.5 } ); } Yes, we're being very cavalier here and defining things into the main File::Find::Rule namespace. This is due to lack of imaginiation on my part - I simply can't find a way for the functional and oo interface to work without doing this or some kind of inheritance, and inheritance stops you using two File::Find::Rule::Foo modules together. For this reason try and pick distinct names for your extensions. If this becomes a problem then I may institute a semi-official registry of taken names. Taking no arguments. Note the null prototype on random. This is a cheat for the procedural interface to know that your sub takes no arguments, and so allows this to happen: find( random => in => '.' ); If you hadn't declared "random" with a null prototype it would have consumed "in" as a parameter to it, then got all confused as it doesn't know about a '.' rule. AUTHOR
Richard Clamp <> COPYRIGHT
Copyright (C) 2002 Richard Clamp. All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
File::Find::Rule File::Find::Rule::MMagic was the first extension module, so maybe check that out. perl v5.12.4 2011-09-19 File::Find::Rule::Extending(3pm)

Featured Tech Videos

All times are GMT -4. The time now is 07:28 AM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy