Sponsored Content
Top Forums Programming Perl scripting help for hidden file Post 302781613 by ps_tech on Sunday 17th of March 2013 09:22:26 AM
Old 03-17-2013
Perl scripting help for hidden file

Hi There,

Can anyone please let me know, how to write hidden file in perl?

I tried opning hidden file in write mode but its failing to create it.

Appreciate your help in this.

Thanks
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Finding Hidden files and protecting the folder containing hidden files from deletion

Hi. I have a script which is deleting files with a particular extension and older than 45 days.The code is: find <path> -name "<filename_pattern>" -mtime +45 -exec rm {} \; But the problem is that some important files are also getting deleted.To prevent this I have decide to make a dummy... (4 Replies)
Discussion started by: pochaw
4 Replies

2. 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

3. 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

4. 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

5. Shell Programming and Scripting

Hidden Characters in Regular Expression Matching Perl - Perl Newbie

I am completely new to perl programming. My father is helping me learn said programming language. However, I am stuck on one of the assignments he has given me, and I can't find very much help with it via google, either because I have a tiny attention span, or because I can be very very dense. ... (4 Replies)
Discussion started by: kittyluva2
4 Replies

6. UNIX for Dummies Questions & Answers

List all directories hidden or not hidden

I want to list all directories hidden or not hidden. ls -ld */ => shows only not hidden directories so i guess the answer would be to add the a option to show all files ls -lad */ => not working :confused: ls -la | grep "^d" => works But I would like to know why I can't use ls -lad... (4 Replies)
Discussion started by: servus
4 Replies

7. Shell Programming and Scripting

Parse through a txt file PERL scripting

Below is a perl code I am trying. #!/usr/bin/perl #use strict; use warnings qw/ all FATAL /; use constant ENV_FILE => '/apps/env_data.txt'; $uenv = $ARGV; my $input = $uenv; open my $fh, '<', ENV_FILE or die sprintf qq{Unable to open "%s" for input: $!}, ENV_FILE; ... (2 Replies)
Discussion started by: Tuxidow
2 Replies

8. UNIX for Beginners Questions & Answers

Finding Files with Perl on a Hidden Dir?

Greetings! Been a while since I futzed around with Perl, and came upon a minor headscratcher for the community ;) Here's the basic code which I'm trying to make tick over:#!/usr/bin/perl use strict; use warnings; use diagnostics; print " starting "; while (-e "~/.somedir/testFile")... (9 Replies)
Discussion started by: LinQ
9 Replies

9. Shell Programming and Scripting

Rsync - how to copy hidden folder or hidden files when using full path

Hello. I use this command : rsync -av --include=".*" --dry-run "$A_FULL_PATH_S" "$A_FULL_PATH_D"The data comes from the output of a find command. And no full source directories are in use, only some files. Source example... (2 Replies)
Discussion started by: jcdole
2 Replies
Devel::Hide(3pm)					User Contributed Perl Documentation					  Devel::Hide(3pm)

NAME
Devel::Hide - Forces the unavailability of specified Perl modules (for testing) SYNOPSIS
use Devel::Hide qw(Module/ToHide.pm); require Module::ToHide; # fails use Devel::Hide qw(Test::Pod Test::Pod::Coverage); require Test::More; # ok use Test::Pod 1.18; # fails Other common usage patterns: $ perl -MDevel::Hide=Module::ToHide Makefile.PL bash$ PERL5OPT=MDevel::Hide bash$ DEVEL_HIDE_PM='Module::Which Test::Pod' bash$ export PERL5OPT DEVEL_HIDE_PM bash$ perl Makefile.PL outputs (like blib) Devel::Hide hides Module::Which, Test::Pod, etc. DESCRIPTION
Given a list of Perl modules/filenames, this module makes "require" and "use" statements fail (no matter the specified files/modules are installed or not). They die with a message like: Can't locate Module/ToHide.pm (hidden) The original intent of this module is to allow Perl developers to test for alternative behavior when some modules are not available. In a Perl installation, where many modules are already installed, there is a chance to screw things up because you take for granted things that may not be there in other machines. For example, to test if your distribution does the right thing when a module is missing, you can do perl -MDevel::Hide=Test::Pod Makefile.PL forcing "Test::Pod" to not be found (whether it is installed or not). Another use case is to force a module which can choose between two requisites to use the one which is not the default. For example, "XML::Simple" needs a parser module and may use "XML::Parser" or "XML::SAX" (preferring the latter). If you have both of them installed, it will always try "XML::SAX". But you can say: perl -MDevel::Hide=XML::SAX script_which_uses_xml_simple.pl NOTE. This module does not use Carp. As said before, denial dies. This module is pretty trivial. It uses a code reference in @INC to get rid of specific modules during require - denying they can be successfully loaded and stopping the search before they have a chance to be found. There are three alternative ways to include modules in the hidden list: o setting @Devel::Hide::HIDDEN o environment variable DEVEL_HIDE_PM o import() Optionally, you can propagate the list of hidden modules to your process' child processes, by passing '-from:children' as the first option when you use() this module. This works by populating "PERL5OPT", and is incompatible with Taint mode, as explained in perlrun. CAVEATS There is some interaction between "lib" and this module use Devel::Hide qw(Module/ToHide.pm); use lib qw(my_lib); In this case, 'my_lib' enters the include path before the Devel::Hide hook and if Module/ToHide.pm is found in 'my_lib', it succeeds. Also for modules that were loaded before Devel::Hide, "require" and "use" succeeds. Since 0.0005, Devel::Hide warns about modules already loaded. $ perl -MDevel::Hide=Devel::Hide -e '' Devel::Hide: Too late to hide Devel/Hide.pm EXPORTS Nothing is exported. ENVIRONMENT VARIABLES
DEVEL_HIDE_PM - if defined, the list of modules is added to the list of hidden modules DEVEL_HIDE_VERBOSE - on by default. If off, supresses the initial message which shows the list of hidden modules in effect PERL5OPT - used if you specify '-from:children' SEE ALSO
"perldoc -f require" Test::Without::Module BUGS
Please report bugs via CPAN RT http://rt.cpan.org/NoAuth/Bugs.html?Dist=Devel-Hide <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Devel-Hide>. AUTHORS
Adriano R. Ferreira, <ferreira@cpan.org> with contributions from David Cantrell <dcantrell@cpan.org> COPYRIGHT AND LICENSE
Copyright (C) 2005-2007 by Adriano R. Ferreira This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.4 2007-11-15 Devel::Hide(3pm)
All times are GMT -4. The time now is 05:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy