Sponsored Content
Full Discussion: Perl scripting
Top Forums UNIX for Dummies Questions & Answers Perl scripting Post 20893 by crawler on Tuesday 7th of May 2002 06:23:49 AM
Old 05-07-2002
edited post

[Snipped by LivinFree]
Crawler - that was innapropriate.

It was counter-productive and a waste of time.

"A little knowledge is a scary thing"

Last edited by LivinFree; 05-11-2002 at 01:45 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Perl scripting

hi Can any one suggest me book for perl scripting on UNIX Platform. Regards (2 Replies)
Discussion started by: rochitsharma
2 Replies

2. Shell Programming and Scripting

perl scripting

Hi does anyone know how to ouput "I love scripting" to "scripting love I" without using reverse() function in perl? Thanks (2 Replies)
Discussion started by: ccp
2 Replies

3. Shell Programming and Scripting

Need help in perl scripting.

Hi, To run a perl script i am giving command like this in DOS prompt d:> perl D:\<dir_name>\<dir_name>\sample.pl Its throwing the following error while running the above syntax error at <eval 4> line 1, near "use D:" Can anyone help? (3 Replies)
Discussion started by: mvictorvijayan
3 Replies

4. Shell Programming and Scripting

Call Shell scripting from Perl Scripting.

Hi How to call a shell scripting through a Perl scripting? Actually I need some value from Shell scripting and passes in the Perl scripting. So how can i do this? (2 Replies)
Discussion started by: anupdas
2 Replies

5. UNIX for Dummies Questions & Answers

Need help configuring Active Perl on Windows Vista.: Perl Scripting on Windows

Hi All, Need help configuring Active Perl on Windows Vista. I am trying to install Active Perl on Windows Vista. The version of Active Perl i am trying to install is : ActivePerl 5.10.1 Build 1006 After installing it through cmd, When i try to run perl -v to check the version, i get the... (2 Replies)
Discussion started by: Vabiosis
2 Replies

6. What is on Your Mind?

Shell scripting vs Perl scripting

Hi all, I would like to start developping some good scripting skills. Do you think it would be best to start with shell scripting or Perl? I already got a fundation, really basics, in perl. but I am wondering what would be best to be good at first. Can you please help me determine which one to... (14 Replies)
Discussion started by: Pouchie1
14 Replies

7. What is on Your Mind?

Shell Scripting vs Perl scripting

Gents, I have been working in a Solaris/Unix environment for about 9 months. I took some linux classses online before getting the job. But, I am not very good at scripting. I want to learn how to script. Do you think that I should start with Shell scripting or Perl? I wanted to continue with... (2 Replies)
Discussion started by: Pouchie1
2 Replies

8. Web Development

Perl scripting or shell scripting?

i am going to study any one of the scripting languages mentioned above(shell 0r perl scripting) . Which is having more scope for a fresher? (1 Reply)
Discussion started by: Anna Hussie
1 Replies

9. Shell Programming and Scripting

need help in PERL Scripting

I am having file xyz.log Its content is like this int main() { d; #ifdef e; f; #else g; #ifdef h. #else i; (2 Replies)
Discussion started by: naaj_ila
2 Replies

10. Shell Programming and Scripting

Perl Scripting

I have create this shell script #!/bin/sh if ; then echo "Usage: ./script <filename>" exit 1 elif ; then fname="$1" fi output="output.txt" i=0 ... (11 Replies)
Discussion started by: Evelin90
11 Replies
Vend::CounterFile(3pm)					User Contributed Perl Documentation				    Vend::CounterFile(3pm)

NAME
Vend::CounterFile - Persistent counter class SYNOPSIS
use Vend::CounterFile; $c = new Vend::CounterFile "COUNTER", "aa00"; $id = $c->inc; open(F, ">F$id"); DESCRIPTION
(This module is modified from Gisle Aas File::CounterFile to use Interchange's locking protocols -- lack of fcntl locking was causing counter problems.) This module implements a persistent counter class. Each counter is represented by a separate file in the file system. File locking is applied, so multiple processes might try to access the same counters at the same time without risk of counter destruction. You give the file name as the first parameter to the object constructor ("new"). The file is created if it does not exist. If the file name does not start with "/" or ".", then it is interpreted as a file relative to $Vend::CounterFile::DEFAULT_DIR. The default value for this variable is initialized from the environment variable "TMPDIR", or /usr/tmp is no environment variable is defined. You may want to assign a different value to this variable before creating counters. If you pass a second parameter to the constructor, that sets the initial value for a new counter. This parameter only takes effect when the file is created (i.e. it does not exist before the call). When you call the "inc()" method, you increment the counter value by one. When you call "dec()" the counter value is decrementd. In both cases the new value is returned. The "dec()" method only works for numerical counters (digits only). You can peek at the value of the counter (without incrementing it) by using the "value()" method. The counter can be locked and unlocked with the "lock()" and "unlock()" methods. Incrementing and value retrieval is faster when the counter is locked, because we do not have to update the counter file all the time. You can query whether the counter is locked with the "locked()" method. There is also an operator overloading interface to the Vend::CounterFile object. This means that you might use the "++" operator for incrementing the counter, "--" operator for decrementing and you can interpolate counters diretly into strings. BUGS
(This problem alleviated by this modified module) It uses flock(2) to lock the counter file. This does not work on all systems. Perhaps we should use the File::Lock module? COPYRIGHT
Copyright (c) 1995-1998 Gisle Aas. All rights reserved. Modifications made by and copyright (C) 2002 Red Hat, Inc. and (c) 2002-2007 Interchange Development Group This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. AUTHOR
Gisle Aas <aas@sn.no> perl v5.14.2 2010-03-25 Vend::CounterFile(3pm)
All times are GMT -4. The time now is 08:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy