Sponsored Content
Top Forums Shell Programming and Scripting Perl failure with "main::$fn" used only once:" in error logs Post 302776695 by DGPickett on Wednesday 6th of March 2013 04:50:04 PM
Old 03-06-2013
Beginners Intro to Perl - Part 6 - Perl.com says:

1. Name ``main::filename'' used only once: possible typo at ./a6-warn.pl line 3. and Name ``main::fn'' used only once: possible typo at ./a6-warn.pl line 4. Perl notices that $filename and $fn both only get used once, and guesses that you've misspelled or misnamed one or the other. This is because this almost always happens because of typos or bugs in your code, like using $filenmae instead of $filename, or using $filename throughout your program except for one place where you use $fn (like in this program).

You can run CGI on the command line, just set the variables it reads.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

2. SuSE

VMDB Failure" followed by "Unable to open snapshot file"

keep getting an error when I try to revert to a snapshot: "VMDB Failure" followed by "Unable to open snapshot file" Im using vmware server 1.0.4, host OS is windows xp and guest OS is SLES. Is there anything I can do to recover the snapshot or am I in trouble!?!?! (0 Replies)
Discussion started by: s_linux
0 Replies

3. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

4. Cybersecurity

"authentication failure" then "session opened". Why?

Ssh connections using shared public keys issue “authentication failure” messages, then succeed with “session opened”. I have found a few other threads with similar issue, but no solutions offered. :wall: How can I eliminate the failure messages? Environment: $ uname -a Linux... (0 Replies)
Discussion started by: KennyCason
0 Replies

5. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

6. Shell Programming and Scripting

Failure: if grep "$Var" "$line" inside while read line loop

Hi everybody, I am new at Unix/Bourne shell scripting and with my youngest experiences, I will not become very old with it :o My code: #!/bin/sh set -e set -u export IFS= optl="Optl" LOCSTORCLI="/opt/lsi/storcli/storcli" ($LOCSTORCLI /c0 /vall show | grep RAID | cut -d " "... (5 Replies)
Discussion started by: Subsonic66
5 Replies

7. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

8. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

Hi 2 all, i have had AIX 7.2 :/# /usr/IBMAHS/bin/apachectl -v Server version: Apache/2.4.12 (Unix) Server built: May 25 2015 04:58:27 :/#:/# /usr/IBMAHS/bin/apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_worker_module (static) ... (3 Replies)
Discussion started by: penchev
3 Replies
HTML::Display(3pm)					User Contributed Perl Documentation					HTML::Display(3pm)

NAME
HTML::Display - display HTML locally in a browser SYNOPSIS
use strict; use HTML::Display; # guess the best value from $ENV{PERL_HTML_DISPLAY_CLASS} # or $ENV{PERL_HTML_DISPLAY_COMMAND} # or the operating system, in that order my $browser = HTML::Display->new(); warn "# Displaying HTML using " . ref $browser; my $location = "http://www.google.com/"; $browser->display(html => $html, location => $location); # Or, for a one-off job : display("<html><body><h1>Hello world!</h1></body></html>"); DESCRIPTION
This module abstracts the task of displaying HTML to the user. The displaying is done by launching a browser and navigating it to either a temporary file with the HTML stored in it, or, if possible, by pushing the HTML directly into the browser window. The module tries to automagically select the "correct" browser, but if it dosen't find a good browser, you can modify the behaviour by setting some environment variables : PERL_HTML_DISPLAY_CLASS If HTML::Display already provides a class for the browser you want to use, setting "PERL_HTML_DISPLAY_CLASS" to the name of the class will make HTML::Display use that class instead of what it detects. PERL_HTML_DISPLAY_COMMAND If there is no specialized class yet, but your browser can be controlled via the command line, then setting "PERL_HTML_DISPLAY_COMMAND" to the string to navigate to the URL will make HTML::Display use a "system()" call to the string. A %s in the value will be replaced with the name of the temporary file containing the HTML to display. %HTML::Display::os_default The hash %HTML::Display::os_default contains pairs of class names for the different operating systems and routines that test whether this script is currently running under it. If you you want to dynamically add a new class or replace a class (or the rule), modify %os_default : # Install class for MagicOS $HTML::Display::os_default{"HTML::Display::MagicOS"} = sub { $^O =~ qr/magic/i }; __PACKAGE__->new %ARGS $browser->display( %ARGS ) Will display the HTML. The following arguments are valid : base => Base to which all relative links will be resolved html => Scalar containing the HTML to be displayed file => Scalar containing the name of the file to be displayed This file will possibly be copied into a temporary file! location (synonymous to base) If only one argument is passed, then it is taken as if html => $_[0] was passed. EXPORTS
The subroutine "display" is exported by default COMMAND LINE USAGE
Display some HTML to the user : perl -MHTML::Display -e "display '<html><body><h1>Hello world</body></html>'" Display a web page to the user : perl -MLWP::Simple -MHTML::Display -e "display get 'http://www.google.com'" Display the same page with the images also working : perl -MLWP::Simple -MHTML::Display -e "display html => get('http://www.google.com'), location => 'http://www.google.com'" AUTHOR
Copyright (c) 2004-2007 Max Maischein "<corion@cpan.org>" LICENSE
This module is released under the same terms as Perl itself. perl v5.10.1 2007-10-20 HTML::Display(3pm)
All times are GMT -4. The time now is 11:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy