10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i just wanted to know whether is it possible to open a website link and get a response in the form of xml or html format...
the website is of local network...
for example something like this
wget http://blahblah.samplesite.com/blachblahcblach/User/jsp/ShowPerson.jsp?empid=123456
... (2 Replies)
Discussion started by: vivek d r
2 Replies
2. Shell Programming and Scripting
hey huys,
i'm extacting some data from a webpage. I used
lynx -dump URL > temp.dat
its working fine, but I need some data that is in the html code, so how could I store the whole html code of the URL in a file and exit like the above code. (2 Replies)
Discussion started by: Johanni
2 Replies
3. Programming
In C, given a name or path to a file, how do I check if the path is valid, and how can I check its permisions will let me read from it, and how do i check if its an empty file? (15 Replies)
Discussion started by: omega666
15 Replies
4. Shell Programming and Scripting
Hi All,
I have a total of ten file to open in the Perl script and i am using a for loop to open each file and capture some strings inside each file.
Unfortunately, i encounter the below syntax error.
I think there should be something wrong with this term reports_${counting}_${_}.txt but i do... (4 Replies)
Discussion started by: Raynon
4 Replies
5. Web Development
Im aware under IE, javascript uses ActiveX Objects to open up and manipulate text files, excel files etc..
How abouts would I open a text file using javascript in Firefox ?
thanks (1 Reply)
Discussion started by: JamesGoh
1 Replies
6. Shell Programming and Scripting
I tried opening the files in a directory and print thier names.
But it was thowing the error "unable to open directorty at t5.pl line 2."
Can u plz correct this error in below mentioned code.
#!/data/scoredev/perl
opendir(HOMEDIR,"c:\vin") || die("unable to open directorty");... (3 Replies)
Discussion started by: vinay123
3 Replies
7. Shell Programming and Scripting
Hi have set a command line argument where the user enters the filename.
I have set a condition that if the command line is null (user just enters return), the script will exit (with an error message).
However, what if the user types something and the file isn't found. How will I go about... (20 Replies)
Discussion started by: Cactus Jack
20 Replies
8. UNIX for Dummies Questions & Answers
Is there any other way to open a file in append mode without using C calls or >> redirection? (1 Reply)
Discussion started by: vidhya
1 Replies
9. UNIX for Dummies Questions & Answers
I am very new to unix. I want to open a file and read one line in at a time. Can anybody help? (3 Replies)
Discussion started by: saarshad001
3 Replies
10. UNIX for Dummies Questions & Answers
I'm a new to UNIX/LINUX. I just put cygwin on my laptop and I can navigate around the directories, but I can't open files (.doc, .ppt, .html or .exe). Is there an explicit command to do this? I know that in Solaris when it does not recognize the file, it brings up the list of available viewing... (4 Replies)
Discussion started by: AJA
4 Replies
Perl::Critic::Policy::InputOutput::ProhibitTwoArgOpen(3pUser Contributed Perl DocumentatPerl::Critic::Policy::InputOutput::ProhibitTwoArgOpen(3pm)
NAME
Perl::Critic::Policy::InputOutput::ProhibitTwoArgOpen - Write "open $fh, q{<}, $filename;" instead of "open $fh, "<$filename";".
AFFILIATION
This Policy is part of the core Perl::Critic distribution.
DESCRIPTION
The three-argument form of "open" (introduced in Perl 5.6) prevents subtle bugs that occur when the filename starts with funny characters
like '>' or '<'. The IO::File module provides a nice object-oriented interface to filehandles, which I think is more elegant anyway.
open( $fh, '>output.txt' ); # not ok
open( $fh, q{>}, 'output.txt' ); # ok
use IO::File;
my $fh = IO::File->new( 'output.txt', q{>} ); # even better!
It's also more explicitly clear to define the input mode of the file, as in the difference between these two:
open( $fh, 'foo.txt' ); # BAD: Reader must think what default mode is
open( $fh, '<', 'foo.txt' ); # GOOD: Reader can see open mode
This policy will not complain if the file explicitly states that it is compatible with a version of perl prior to 5.6 via an include
statement, e.g. by having "require 5.005" in it.
CONFIGURATION
This Policy is not configurable except for the standard options.
NOTES
There are two cases in which you are forced to use the two-argument form of open. When re-opening STDIN, STDOUT, or STDERR, and when doing
a safe pipe open, as described in perlipc.
SEE ALSO
IO::Handle
IO::File
AUTHOR
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com>
COPYRIGHT
Copyright (c) 2005-2011 Imaginative Software Systems. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-06-07 Perl::Critic::Policy::InputOutput::ProhibitTwoArgOpen(3pm)