Sponsored Content
Full Discussion: Perl help for file handling
Top Forums Programming Perl help for file handling Post 302532390 by yazu on Monday 20th of June 2011 11:58:48 PM
Old 06-21-2011
DELETED

Last edited by yazu; 06-21-2011 at 08:36 AM.. Reason: OP changed question
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

file handling problem in perl......

Hi, I am opening a file......then i am wrting some data into it......and i am reopening the file again but ......i get a error cannot open file....... $::file= "\adder\testfile.txt" open(TEST1,$::file); some write operation close(TEST1) open(TEST1,$::file) 'I GET A ERROR CAN OPEN... (2 Replies)
Discussion started by: vivekshankar
2 Replies

2. Shell Programming and Scripting

Signal handling in Perl

Guys, I'm doing signal handling in Perl. I'm trying to catch ^C signal inside the script. There two scripts : one shell script and one perl script. The shell script calls the perl script. For e.g. shell script a.sh and perl scipt sig.pl. Shell script a.sh looks something like this :... (6 Replies)
Discussion started by: obelix
6 Replies

3. Shell Programming and Scripting

Perl revers File handling

Hi Experts, I have a big text file, so I want read it at eof to upper bound !. after I use a fseek to go SEEK_END, is it possible to step up upperbound? Best Regards. Note that I'm used perl script. (2 Replies)
Discussion started by: Zaxon
2 Replies

4. Programming

XML Handling in Perl

Hi there, I'm newby in perl and XML. I can read and parse Xml with XML-Node upper XML::Parser, but how can I create XML tags and pack my individual data in it then send through socket. PLZ lead me :) Thanks in Advance. (1 Reply)
Discussion started by: Zaxon
1 Replies

5. Shell Programming and Scripting

file handling in perl without using system command

Hi , Is there any way to achieve following using perl program (i.e without using system command). 1.system ("echo 'test' > /usr/spool/ship.csv"); 2.system ("cat /usr/ajay_test* >> /usr/spool/RAM/work/patil.csv"); 3.system("> /usr/spool/ajay.txt"); e.g for system("rm -f... (1 Reply)
Discussion started by: ajaypatil_am
1 Replies

6. Shell Programming and Scripting

Perl and Sockets - Error handling

Hello all, I have created a Perl script that tries to open connections to various systems on different ports in order to see if the machines are reachable, the ports are open, etc. There appears to be a difference between Solaris (10) and Linux (RH/Oracle and Ubuntu) in the status or error it... (4 Replies)
Discussion started by: Hollinch
4 Replies

7. Shell Programming and Scripting

Handling Parameters in Perl

Hi All, I'm pretty new to the forum and also to UNIX. I have a requirement for which I need some help. I have a script (example.script) where I get user inputs using the read command. I would need to pass the read-fetched input to a perl command (explained below) in my script. The part which... (3 Replies)
Discussion started by: bharath.gct
3 Replies

8. Shell Programming and Scripting

PERL error handling

I have a PERL command line embedded in a UNIX script. The script doesn't handle errors coming out of this command. I'm processing large files and occassionally I run out of disk space and end up with half a file. perl -p -e 's/\n/\r\n/g' < TR_TMP_$4 > $4 How do I handle errors coming out... (1 Reply)
Discussion started by: OTChancy
1 Replies

9. Shell Programming and Scripting

Perl file handling error

Hi, I am reading and file and writting each word to other file. where I have used array to store the data. I am getting below error as "Use of uninitialized value in concatenation (.) or string at customize_split_raw.pl line 51, <IN_FILE> " Where my line 51 code is 50 foreach... (8 Replies)
Discussion started by: Beginer123
8 Replies

10. Shell Programming and Scripting

Perl : How is file handling working here??

Hi, I have a perl script which is just reading from the file but what I would like to understand is how the counter is moving without using the loop in the script. Below are the details: $ more /tmp/abc.txt This is 0 This is 1 This is 2 This is 3 This is 4 This is 5 This is 6 This... (2 Replies)
Discussion started by: siddharthjindal
2 Replies
IMAP::Admin(3)						User Contributed Perl Documentation					    IMAP::Admin(3)

NAME
Cyrus::IMAP::Admin - Cyrus administrative interface Perl module SYNOPSIS
use Cyrus::IMAP::Admin; my $client = Cyrus::IMAP::Admin->new('mailhost'[, $flags]); $rc = $client->create('user.auser'[, $partition]); $rc = $client->delete('user.auser'); $rc = $client->deleteacl('user.buser', 'user1', 'user2'); %acls = $client->listacl('user.buser'); @mailboxes = $client->list('*'); @mailboxes = $client->list('%', 'user.'); @mailboxes = $client->subscribed('*'); %quota = $client->quota($root); ($root, %quota) = $client->quotaroot($mailbox); $rc = $client->rename($old, $new[, $partition]); $rc = $client->setacl($mailbox, $user =E<gt> $acl[, ...]); $rc = $client->setquota($mailbox, $resource =E<gt> $quota[, ...]); $rc = $client->xfer($mailbox, $server[, $partition]); DESCRIPTION
This module is a Perl interface to Cyrus administrative functions. It is used to implement Cyrus::IMAP::Admin::Shell (otherwise known as cyradm and also available for use in Perl administrative programs. METHODS
Many of the methods have a cyradm-compatible name and a shorter name. The shorter name is shown in the synopsis when it exists; the cyradm-compatible name should be reasonably obvious. In general, methods return undef or empty lists on error. In some cases a method may return an empty list without an error (i.e. "list" of a nonexistent hierarchy), so it may be necessary to check the error state explicitly via the "error" method. new($server[, $flags]) Instantiates a cyradm object. This is in fact an Cyrus::IMAP object with a few additional methods, so all Cyrus::IMAP methods are available if needed. (In particular, you will always want to use the "authenticate" method.) error Return the last error that occurred, or undef if the last operation was successful. This is in some cases (such as "list") the only way to distinguish between a successful return of an empty list and an error return. Calling "error" does not reset the error state, so it is legal to write: @folders = $cyradm->list($spec); print STDERR "Error: ", $cyradm->error if $cyradm->error; createmailbox($mailbox[, $partition]) create($mailbox[, $partition]) Create a new mailbox on the specified or default partition. deletemailbox($mailbox) delete($mailbox) Delete a mailbox. As with cyradm, you will probably need to add the c ACL for yourself to the mailbox with "setaclmailbox" first. deleteaclmailbox($mailbox, $user[, ...]) deleteacl($mailbox, $user[, ...]) Delete one or more ACL from a mailbox. listaclmailbox($mailbox) listacl($mailbox) Returns a hash of mailbox ACLs, with each key being a Cyrus user and the corresponding value being the ACL. listmailbox($pattern[, $reference]) list($pattern[, $reference]) List mailboxes matching the specified pattern, starting from the specified reference. The result is a list; each element is an array containing the mailbox name, attributes, and the separator. (This interface may change.) listsubscribed($pattern[, $reference]) subscribed($pattern[, $reference]) Like "listmailbox" but only shows subscribed mailboxes. listquota($root) quota($root) Returns a hash specifying the quota for the specified quota root. Use "listquotaroot" to find the quota root for a mailbox. listquotaroot($mailbox) quotaroot($mailbox) Returns a list, the first element is the quota root for the mailbox and remaining elements are a hash specifying its quota. renamemailbox($from, $to[, $partition]) rename($from, $to[, $partition]) Renames the specified mailbox, optionally moving it to a different partition. setaclmailbox($mailbox, $user => $acl[, ...]) setacl($mailbox, $user => $acl[, ...]) Set ACLs on a mailbox. The ACL may be one of the special strings "none", "read" ("lrs"), "post" ("lrsp"), "append" ("lrsip"), "write" ("lrswipkxte"), "delete" ("lrxte"), or "all" ("lrswipkxte"), or any combinations of the ACL codes: l Lookup (mailbox is visible to LIST/LSUB, SUBSCRIBE mailbox) r Read (SELECT/EXAMINE the mailbox, perform STATUS) s Seen (set/clear SEEN flag via STORE, also set SEEN flag during APPEND/COPY/FETCH BODY[...]) w Write flags other than SEEN and DELETED i Insert (APPEND, COPY destination) p Post (send mail to mailbox) k Create mailbox (CREATE new sub-mailboxes, parent for new mailbox in RENAME) x Delete mailbox (DELETE mailbox, old mailbox name in RENAME) t Delete messages (set/clear DELETED flag via STORE, also set DELETED flag during APPEND/COPY) e Perform EXPUNGE and expunge as part of CLOSE a Administer (SETACL/DELETEACL/GETACL/LISTRIGHTS) setquota($mailbox, $resource, $quota[, ...]) Set quotas on a mailbox. Note that Cyrus currently only defines one resource, "STORAGE". As defined in RFC 2087, the units are groups of 1024 octets (i.e. Kilobytes) xfermailbox($mailbox, $server[, $partition]) xfer($mailbox, $server[, $partition]) Transfers (relocates) the specified mailbox to a different server. AUTHOR
Brandon S. Allbery, allbery@ece.cmu.edu SEE ALSO
Cyrus::IMAP Cyrus::IMAP::Shell perl(1), cyradm(1), imapd(8). perl v5.12.1 2008-04-04 IMAP::Admin(3)
All times are GMT -4. The time now is 10:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy