slash
If I want the following field to contain forwarded slashes - this is for a linux box, as follows. $dir="//ITC/home/techs"; How do I get the forward slashes in there? I have tried: $dir ="'//ITC'"; $dir ='"//ITC"'; $dir =`"//ITC"`; Nothing works. Help. Thank you - Susan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ASN1.pm
I am getting an error can't locate ASN1.pm, I have tracked that down to - I need Convert-BER-1.25.tar.gz. I have downloaded the file. I cannot find the documents on this download, where to unzip and load, etc... Does anybody know. Thanks - Susan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Net::LDAP
Hello, Can anyone tell me why I am receiving an error can't locate Net/LDAP.pm in @ INC (@INC includes /usr/lib/perl5/5.6.1 etc, etc etc, etc. Thanks - Susan P.S - No, I am not a Student. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
using an AND operator
Is there an AND operator in perl? For example; if ($SRF=1 and $SRL=1) {print"YES";) Any help would be appreciated. Thank you - Susan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
strip first space
If I have a string and the first character is a space, may not always be a space. Example: John Tommy Beth John and Beth have a space, Tommy does not. How do I strip that. I do not want to use the global command because a want the space between First and Last name. Any suggestions? Susan Information Technology Center 828-627-8314 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ignore spaces in files
I have been writing Perl code for (1) week as of today. Thanks to the beginner user e:mail, and thank you to John Edwards, and [EMAIL PROTECTED], and other input I have learned from this page. I have put togther the following. It works well, and is doing what I want it to do. Except, 1 little problem remains. Please read the below, and I would appreciate any advice. I have tried trim and chomp with no results. Thank You Susan. (P.S. - I am not a student - I work in the ITC department.) This routine opens 15 different school files, for this example, I have shorten it to 1 school. It creates a data file call STNAME.DAT. This file contains, last name, first name, student #, and school #. I then open STNAME, look for duplicates using ( first 5 char's of last name+1 char of first name). Look in arrary does it exist. if yes, add a counter to name. I then store this in a result file, called result.dat. What my question is, how do I strip out the spaces on the last name if the last name is not 5 char. long. example: ASHE J 123456 396. Example: open(FILE396,"396.TXT") or die $!; # open file for input SCHOOLS INDIV. FILE print OUT substr($_,12,5),substr($_,30,1),substr($_,3,9)," ",substr($_,0,3),"\n" while ; close(FILE396); # CREATE result file, look for duplicates add counter on name, rebuild string my %names; open(I,"STNAMES.DAT") or die"name: $!\n"; # open student consolidated names open(O,">results.dat") or die"results: $!\n"; # result file open output foreach $line() { my $name=substr($line,0,6); my $workingname=$name; my $counter=1; while(exists($names{$workingname})) { $workingname=$name.$counter; $counter++; } $names{$workingname}=$workingname; print O $workingname,substr($line,7,13),"\n"; # add back Student # # School # } # The file below is results.dat (if last name is less than 5 chars. it fille in spaces. I want the spaces gone) LINDSD 5 314 LINDS1 13065 314 LINDS2 225 396 LINDS3 11125 378 LOCK S 90174 314 LOKE J 14013 314 LONDOS 13009 314 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help me out
I took your advice and added the following code to my source code. I want to print the students name to the result file regardless if I add a number on the end of the student name or not. I have tried putting the PRINT O at different location in this code. I can not get it to print to the result file. WHY and HELP!! Thank You Susan open(I,'STNAMES.DAT') or die$!; # open student consolidated names open(O,'>results') or die"results: $!\n"; # result file open output $c=1; $foo=substr($_,0,26);# strip out only the student last name and first name. while(exists($student{$foo})){ # if the students is used already $foo= "$_$c"; # add the numer to it $_=$foo,substr($_,27,20); # add the remainder of the file back on to input string $c++; # increment the number } > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
$foo
I am learning Perl, so this may seem a dumb question to the advance Perl Programmers. What exact purpose does $foo do? Example $foo=$_. What benefit do I get from making the input string $foo? Every place I look I do not get a clear understanding or picture of $foo. Thank you Susan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Fwd: Returned mail]
--- Begin Message --- --- The message cannot be delivered to the following addresses. --- [EMAIL PROTECTED]Mailbox unknown or not accepting mail. 550 5.1.1 <[EMAIL PROTECTED]>... User unknown --- Original message included (or as an attachment) --- --- Begin Message --- --- Begin Message --- What is the fastest or best way to sort a file alphabetically, the rewrite it to a file. Thanks Susan Haywood County Schools -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- End Message --- --- End Message --- --- End Message --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
sort file
What is the fastest or best way to sort a file alphabetically, the rewrite it to a file. Thanks Susan Haywood County Schools -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]